hi all
i'm trying to add a 'search by keyword' text field to a search page. the 'search by
keyword' search field should allow users to enter a comma delimited string containing
a list of keywords to search the database for.
on the search_results page, what happens is:
-i use explode() to
on the search_results page, what happens is:
-i use explode() to break the comma-delimited string down into array
elements, and count() to count the number of array elements
-then i use a for loop to cycle through the list of array elements and
run a sql query to search through a table for any
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
Re my earlier post...
I seem to have figured it out by changing the following lines :
//===
{
$result= `grep -n Started logs/$file` ;
echo 'trtdfont size=2a href=/logs/'.$file.'' . $file .
'/td/font/a'.
Greetings learned PHP(eople),
What is the best method to search a text file for a specific string and
return it to a form ?
I`m not looking for you guys (and gals) to give me the answer, just
point me in the right direction
So long and thanks for all the fish..
--
Chris Blake
Office
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
-Original Message-
From: Chris Blake [mailto:[EMAIL PROTECTED]
Sent: 7. maaliskuuta 2003 11:16
To: [EMAIL PROTECTED]
Subject: [PHP] Search for keyword in txt file
Greetings learned PHP(eople),
What is the best method to search a text file for a specific string and
return it to a form
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.
I will
, it should!;
preg_match_all(/.*should.*/i, $file, $aMatches, PREG_PATTERN_ORDER);
var_dump($aMatches);
?
/pre
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
Ok, it`s
9 matches
Mail list logo