WordPress Development Question:
Download Questions PDF

How come code
<?php print "Contents: $arr[1]"; ?>
works, but
<?php print "Contents: $arr[1][2]"; ?>
doesn't for two-dimensional array of mine?


Any time you have an array with more than one dimension, complex parsing syntax is required. print "Contents: {$arr[1][2]}" would've worked. /> - Yes.

Download WordPress Expert Interview Questions And Answers PDF

Previous QuestionNext Question
Why doesn't the following code print the newline properly?Can you please explain the difference between accessing a class method via -> and via ::