Soldato
- Joined
- 12 Feb 2006
- Posts
- 17,889
- Location
- Surrey
struggling with this and Google doesn't seem to be given the answers i need.
I'm trying to create a simple Ajax search script which query's my database looking for matches like each word typed in the title and the description.
i have used preg_split to split each word over explode as i read that preg_split works better with multiple spaces. the results are stored in an array.
now i want to be able to query the database for each word in one statement but can't figure out how i'd do this without using a for loop. i was expecting to be able to use something like splitSearchWords[x]. so how do i do it?
thanks
also while got this thread open anyone got any tips for searching with php? trying to read stuff about it online but it's hard finding which is good advice and which is bad.
I'm trying to create a simple Ajax search script which query's my database looking for matches like each word typed in the title and the description.
i have used preg_split to split each word over explode as i read that preg_split works better with multiple spaces. the results are stored in an array.
now i want to be able to query the database for each word in one statement but can't figure out how i'd do this without using a for loop. i was expecting to be able to use something like splitSearchWords[x]. so how do i do it?
thanks
also while got this thread open anyone got any tips for searching with php? trying to read stuff about it online but it's hard finding which is good advice and which is bad.