Explain how come the code <?php print contents: $arr[1]; ?> Works, but <?php print contents: $arr[1][2]; ?> Doesn't for two-dimensional array of mine?
Answer / Gaurav Singhal
The code <code><?php print contents: $arr[1]; ?></code> works because $arr[1] accesses a single element of the one-dimensional array. However, the code <code><?php print contents: $arr[1][2]; ?></code> does not work since it attempts to access the third element ($arr[1][2]) of a two-dimensional array without initially defining the first and second dimensions.
| Is This Answer Correct ? | 0 Yes | 0 No |
Tell me in php, what are magic methods and how are they used?
What are posts?
Described ternary conditional operator in PHP?
What encryption does wordpress use?
What is the Alternative CMS of WordPress?
Explain me how do I prevent comment flooding?
How do I create a subdomain for my website?
What is default table prefix for wordpress?
How to update a wordpress site?
How do I backup a wordpress website?
what’s the difference between site_url() and home_url()?
Where is wordpress media stored?