[eluser]outtolunch[/eluser]
Ok, i managed to work this out i think.
Maybe my question wasn't the best. So yeah, for example i have some records in the database-> car, red car, green car.
The string is-> "I have got a red car."
I want to check the records against the string and find out what i've got in that string.
So i run the loop, i check "car" against the string then "red car" and then "green car". By the way i'm using strpos();
So the system will find two matches, "car" and "red car". I recorded those results into an array, and displayed the last record of the array, which is "red car".
It does't really sound as the best way of doing it, but it works for me. Of course if you have a table with records laid like that-> "red car", "car" I would pull out car out of the array, which wouldn't be accurate.
Uhh....
Feel free to comment.