Does anyone know why I keep getting an error with this “foreach” statement
[QUOTE]
$query = “SELECT * FROM `tablinfo
query ends here for now*/
foreach($trimmed_array as $kw){
if (!is_array($trimmed))
{
$kw = $trimm = str_replace(“,”, ” “, $kw);
//echo “and kw is “.$kw. ” “;
}
if (!is_array($trimmed))
{
$first_trim = str_replace(“,”, ” “, $trimmed_array[‘0’]);
}
if($first_trim != $kw){ //this is used in case there’s more than one keyword
$query .= “OR (“;}
/*
<—–Notice that we may add an OR to the SQL if there is more than one keyword in the search
//I use privacy = ‘0’ because some of the users may choose to make their data private.
$query .= “`privacy`title`description`keywords
$query .= “))”;
}