$tally['zero']['status']='hello';
echo $tally['zero']['status'];
//prints hello, this is expected
In this example, why is only the first letter being printed?
$tally = array( "zero" => '0');
$tally['zero']['status']='hello';
echo $tally['zero']['status'];
// prints h, I was expecting hello
In this example, why is an error being thrown?
$tally['zero'] = 0;
$tally['zero']['status']='hello';
echo $tally['zero']['status'];
//prints Warning: Cannot use a scalar value as an array