array error
Posted: Fri Jun 20, 2008 12:39 pm
Hi all,
I have this strange error on php server.
any Idea what can be the problem?
It in_array function works well in other scripts.
Thx. for reply...
I have this strange error on php server.
and my code isWarning: in_array() [function.in-array]: Wrong datatype for second argument in /home/clients/look4place.com/look4place.com/dev/includes/classes/GUI.class/GUI.class.php on line 1228
Code: Select all
$query = "SELECT city FROM orders WHERE city != \"\"";
$row = $this->CallQuery($query);
$temp_Var = array();
$counter = 0;
foreach ($row as $value){
if(!empty($value))
{
if(!in_array($temp_Var, $value))
{
$temp_Var[$counter] = $value;
$counter++;
}
}
}
print_r($temp_Var);
exit;
It in_array function works well in other scripts.
Thx. for reply...