I'm looking for a way to search through a .txt file for specific text. I've read other posts concerning how to do this, but I'm still unsure how to go about it. This is my first attempt at trying to use php to read an "outside" file.
I'd like to set it up something like this: It takes a result from what the user enterned in, and then looks for this result in the text file. Then if it does find a match in the text file, it prints out that it has found it. For example, if the result the user put in was "bb", I'd want to search through the .txt file to see if "bb" is there, and if it was found, print out something like "You have found bb!".
Does the layout of the txt file matter when it comes to searching it? The file I'm using is somewhat organized. It has a layout similar to this:
BEA 1 bb
BEA 2 bbSasa
BEA 3 bbsasa
Also the search for certain text would have to be case sensitive. BB, Bb and bb would be 3 different values.
Any help would be greatly appreciated! Thanks