In my attempt to read from a text file...

From: Date: Mon, 12 Mar 2001 20:13:30 +0000
Subject: In my attempt to read from a text file...
Groups: php.general 
Request: Send a blank email to php-general+get-43537@lists.php.net to get a copy of this message
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

« previous php.general (#43537) next »