Ok, I have a php file which insert in a txt file values entered by a user through some forms. What I need to do now is to perform a search through this text file and come up with every string that matches the results.
Example:
Text File Content
Daniel Shepard 23 Abbey Road London Student
Mike Harris 43 Downing Street London Bricklayer
Diane Mulder 32 Downing Street London Teacher
If I write Downing Street in the search form it should give me
Mike Harris 43 Downing Street London Bricklayer
Diane Mulder 32 Downing Street London Teacher
What Can I Do? I tried to read documentation on php.net, but I didn't come up with the soluton. Thanks in Advance.
Searching in a text file
Moderator: General Moderators
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: Searching in a text file
Take a look at http://uk3.php.net/file and in particular http://uk3.php.net/manual/en/function.f ... ntents.php
Re: Searching in a text file
There are 10 types of people in this world, those who understand binary and those who don't