I'm trying preg_match with no success.

I'd like to search inside the text file for my name, then pull all the info
from that point till the next name which is Fred.

The text file would be called names.txt


So I'm trying to 

preg_match("Peter",names.txt,$myname)

then do the same for Fred, and grab all the stuff in between.

Is this the right way to do this?  Or is there something easier?

How can I search names.txt?  Can I load it into a variable somehow?

Please help


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to