Can php give me row number?
| From: | Jan Grafström | Date: | Sun, 06 May 2001 17:04:36 +0000 |
| Subject: | Can php give me row number? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-51632@lists.php.net to get a copy of this message | ||
Hi!
First I wan´t to thank those kind guys who helped me with the search for
words in a string. It works fine and here goes my file:
---
$fd = fopen($filename1, "r");
$string = fread($fd, filesize($filename1));
fclose($fd);
if (eregi("$word", $string)) {
print "found the word";
}
-----
Now I also wan´t to know to in which row the word was found.
Is there a simple way to add some code?
Thanks for any tips.
Regards
Jan