getting one line from file
| From: | Michael Packer | Date: | Thu, 31 Aug 2000 12:27:22 +0000 |
| Subject: | getting one line from file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-14570@lists.php.net to get a copy of this message | ||
I'm just learning PHP and have a question....in perl I used to do this:
$info =
grep "676" /tmp/somefile.txt;
(i know there was only one line in the file with that number, thats why it's
not @info)
i need to only get one line out of this file that is very large (which is
why i don't want to open it read through the file until i find the correct
line)...
how can i do this easily in PHP?
thanks in advance!
pac