If an array item is declared with key as NULL, array key will automatically be converted to empty string '', as follows:
<?php
$a = array(
NULL => 'zero',
1 => 'one',
2 => 'two');
// This will show empty string for key associated with "zero" value
var_dump(array_keys($a));
// Array elements are shown
reset($a);
while( key($a) !== NULL )
{
echo key($a) . ": ".current($a) . "<br>";// PHP_EOL
next($a);
}
// Array elements are not shown
reset($a);
while( key($a) != NULL ) // '' == null => no iteration will be executed
{
echo key($a) . ": ".current($a) . "<br>";// PHP_EOL
next($a);
}