I was wondering if anyone could tell me what is the fastest way to search through a large (~100 000 lines) textfile? For now my code is this:
- Get user searchword(s)
- Take 1st line of text from file and make it array
- Compare (in_array) array to searchword(s) and output if found in array
- Take 2nd line and so on...
This is very slow procedure. If anyone could point out a faster way to do things, it would be appreciated.