I have been using the following code to breakup a text box and use each keyword to search a database...
but I would now like to display in the page those keywords after they have been seperated (maybe in an array?)...
Yet when I try to echo the query, I get the % signs in there too. Any ideas?
$words = split(" +",addslashes($formdata));
$total_words = count($words);
$query = "SELECT * FROM $Product_DB WHERE ";
$query .= "ProdDesc LIKE \"%" . $words[0] . "%\" ";
for($x=1;$x<$total_words;$x++)
{
$query .= "AND ProdDesc like \"%" . $words[$x] . "%\" ";
}