RE: [PHP] Search for keyword in txt file

2003-03-12 Thread Chris Blake
Re my earlier post... I seem to have figured it out by changing the following lines : //=== { $result= `grep -n Started logs/$file` ; echo '' . $file . ''. '' . $result . ''; } //

RE: [PHP] Search for keyword in txt file

2003-03-12 Thread Chris Blake
Greetings, Sorry for the delay in responding to your posting, I have been grappling with your suggestion for a while and still things are not working out. I have included all my code below and seek your advice.. As it stands, the resultant HTML page prints out the content of each file, but i

RE: [PHP] Search for keyword in txt file

2003-03-07 Thread Niklas Lampén
You might want to use preg_match_all(). Here's a sample of getting whole row with a specified word in it: Niklas -Original Message- From: Chris Blake [mailto:[EMAIL PROTECTED] Sent: 7. maaliskuuta 2003 12:36 To: Php-General Subject: RE: [PHP] Search for keyword in txt file O

RE: [PHP] Search for keyword in txt file

2003-03-07 Thread Ernest E Vogelsinger
At 11:36 07.03.2003, Chris Blake said: [snip] >Ok, it`s not that easy..here`s my code...I wanna search all the >files in the "logs" directory and for each file found I want it to >search for the word "started" and print that line into a table row. >

RE: [PHP] Search for keyword in txt file

2003-03-07 Thread Chris Blake
Ok, it`s not that easy..here`s my code...I wanna search all the files in the "logs" directory and for each file found I want it to search for the word "started" and print that line into a table row. I will probably need to do like a "for each" loopbut where do I insert it ? =

RE: [PHP] Search for keyword in txt file

2003-03-07 Thread Niklas Lampén
Dolphins are gone. ;) Here is your direction: preg_match(). If you need help with it (it can be compicated at first), ask. :) Niklas -Original Message- From: Chris Blake [mailto:[EMAIL PROTECTED] Sent: 7. maaliskuuta 2003 11:16 To: [EMAIL PROTECTED] Subject: [PHP] Search for keyword i