This should work :
$default_array = array('key0'=>NULL,'key1'=>NULL,'key2'=>NULL,'key3'=>NULL);
$the_array = $default_array;
[ ... do some stuff ... ]
if($the_array === $default_array)
{
// handle it
}
brian wrote:
I have an array that is initialised with many keys and all values set
to N
I have an array that is initialised with many keys and all values set to
NULL. I'd like to be able to test these values later to see if any of
them have been set. I tried:
if (!empty(array_values($the_array)))
but that's not allowed, so:
$array_check = array_values($the_array);
if (!empty($ar
2 matches
Mail list logo