Re: Re[4]: [PHP] Searching for text in a file

2001-09-10 Thread Kelly Barrett
gt; Should be: > >> Kelly Barrett> if ($variable == trim($line_text)) { > >> > >> Kelly Barrett> Otherwise you are doing an assignment, which will > >> always be true. > >> > >> Kelly Barrett> Finally, your while loop should pr

Re[4]: [PHP] Searching for text in a file

2001-09-10 Thread Richard Kurth
gt; Kelly Barrett> Because fgets returns EOF at the end of a file, >> not necessarily false (I >> Kelly Barrett> THINK EOF currently is false, though theoretically >> EOF could change to any >> Kelly Barrett> value). >> >> Kelly Barrett> Cheers, >&

RE: Re[2]: [PHP] Searching for text in a file

2001-09-10 Thread Kelly Barrett
fd) == false) { > Kelly Barrett> $line_text = fgets($fd, 2048); > > Kelly Barrett> Because fgets returns EOF at the end of a file, > not necessarily false (I > Kelly Barrett> THINK EOF currently is false, though theoretically > EOF could change to any > Kelly Barret

Re[2]: [PHP] Searching for text in a file

2001-09-10 Thread Richard Kurth
lly Barrett> Kelly. >> -Original Message- >> From: Richard Kurth [mailto:[EMAIL PROTECTED]] >> Sent: Monday, 10 September 2001 5:12 PM >> To: php >> Subject: [PHP] Searching for text in a file >> >> >> I am having a problem with sear

RE: [PHP] Searching for text in a file

2001-09-10 Thread Kelly Barrett
gh theoretically EOF could change to any value). Cheers, Kelly. > -Original Message- > From: Richard Kurth [mailto:[EMAIL PROTECTED]] > Sent: Monday, 10 September 2001 5:12 PM > To: php > Subject: [PHP] Searching for text in a file > > > I am having a problem with sea

Re: [PHP] Searching for text in a file

2001-09-10 Thread David Robley
On Mon, 10 Sep 2001 16:41, Richard Kurth wrote: > I am having a problem with searching through a file for a curtain > text. Like the text below [EMAIL PROTECTED] does not exists in the file > but when I run this it gives me a Match at line number. > I need to run three or four names at a

[PHP] Searching for text in a file

2001-09-09 Thread Richard Kurth
I am having a problem with searching through a file for a curtain text. Like the text below [EMAIL PROTECTED] does not exists in the file but when I run this it gives me a Match at line number. I need to run three or four names at a time through this script to see if they are already t