I have used is_array many times. The variable is an array, see my code, but when i use is_array function it returned false
Any Ideas?
Here is my code.
public function updateCategories($array = null)
{
echo gettype($array); // echos array
if($array = null)
{
return false;
}
if(!is_array($array))
{
echo "false"; // echos false
return false;
}
foreach($array as $key => $val)
{
foreach($val as $Property => $Value)
{
if(!$this->updateCategoryProperty($key, $Property, $Value))
{
return false;
}
}
}
}