WordPress Support Officer Question:
Download Questions PDF

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

WordPress Support Officer Interview Question
WordPress Support Officer Interview Question

Answer:

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 Support Officer Interview Questions And Answers PDF

Previous QuestionNext Question
<?php
$str = 'Hello, there.nHow are you?nThanks for visiting Us';
print $str;
?>
Why does not given code print the newline properly?
Please explain the difference between accessing a class method via -> and via ::