On 9/7/05, Paul Groves [EMAIL PROTECTED] wrote:
I want to be able to break up a number of search terms typed into an input
box into array, simple enough one would think, just use explode, e.g
$array = explode( , $string);
But what if I want to be able to cope with search terms
Brent Baisley wrote:
It sounds like you are trying to build a full text search string,
perhaps for searching a MySQL database?
Actually, I was thinking of doing a MySQL non full-text search, hence
the need to split the words/phrases up so that they could then be fed
into individual WHERE
I want to be able to break up a number of search terms typed into an input
box into array, simple enough one would think, just use explode, e.g
$array = explode( , $string);
But what if I want to be able to cope with search terms seperated by 1
space (a common typing error)? This should work:
- Original Message -
From: Paul Groves [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Wednesday, September 07, 2005 4:54 PM
Subject: [PHP] Breaking up search terms into an array intelligently
I want to be able to break up a number of search terms typed into an input
box
Gustav Wiberg wrote:
- Original Message - From: Paul Groves
[EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Wednesday, September 07, 2005 4:54 PM
Subject: [PHP] Breaking up search terms into an array intelligently
I want to be able to break up a number of search terms typed
- Original Message -
From: Paul Groves [EMAIL PROTECTED]
To: Gustav Wiberg [EMAIL PROTECTED]
Cc: PHP General php-general@lists.php.net
Sent: Wednesday, September 07, 2005 5:45 PM
Subject: Re: [PHP] Breaking up search terms into an array intelligently
Gustav Wiberg wrote
It sounds like you are trying to build a full text search string,
perhaps for searching a MySQL database? Below is the function I came
up with a while ago. It's worked fine, although it currently does not
check for multiple spaces, but that should be easy to change. It uses
a space as a
7 matches
Mail list logo