我知道我可以在双引号中使用数组值。像这样:
<?php echo "my name is: $arr[name]"; ?>
Run Code Online (Sandbox Code Playgroud)
但是当我使用多维数组时,看不到我的结果:
<?php echo "he is $twoDimArr[family][1]"; ?>
Run Code Online (Sandbox Code Playgroud)
在这里,输出为:他是Array [1]
是什么原因
我知道我可以这样使用我的代码:
<?php echo "he is ".$twoDimArr[family][1]; ?>
Run Code Online (Sandbox Code Playgroud)
但我不要这个。