Forum Moderators: coopster
I have just received the following error:
Warning: in_array() [function.in-array]: Wrong datatype for second argument line 57
// Check if $condition is empty (If its empty condition = any )
If (!in_array("any",$condition) && count($condition)>0)
{
// Format the Condition
$ConditionSQL=" AND (";
for ($a=0; $a < count($condition); $a++)
{
$ConditionSQL.="condition LIKE '%".trim($condition[$a])."%' OR ";
}
$ConditionSQL=substr($ConditionSQL,0,strlen($ConditionSQL)-4);
$ConditionSQL.=")";
}
What I am trying to do here is if the variable $condition is empty I want it to then equal 'any'.