$tally['zero']['status']='hello';
echo $tally['zero']['status'];
//prints hello, this is expected
この例では、なぜ最初の文字だけが出力されるのでしょうか?
$tally = array( "zero" => '0');
$tally['zero']['status']='hello';
echo $tally['zero']['status'];
// prints h, I was expecting hello
この例で、エラーがスローされるのはなぜですか?
$tally['zero'] = 0;
$tally['zero']['status']='hello';
echo $tally['zero']['status'];
//prints Warning: Cannot use a scalar value as an array