I know that I can use the value of the array in double quote. Like this:
<?php echo "my name is: $arr[name]"; ?>
But when I use a multidimensional array, I can not see the result:
<?php echo "he is $twoDimArr[family][1]"; ?>
Here's the conclusion: it is an array [1]
What is the reason?
And I know that I can use my code as follows:
<?php echo "he is ".$twoDimArr[family][1]; ?>
But I do not want this.
source
share