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 / Nimmi Gupta
The reason is that you are trying to access a nested element in your array. In PHP, arrays are zero-indexed, so if you have a two-dimensional array and you want to access the second row and third column, you should use $arr[1][2], not $arr[1][3]. The 0-based indexing causes an error when you try to access elements outside of the defined range.
| Is This Answer Correct ? | 0 Yes | 0 No |
Will I have the ability to update my own content?
Is wordpress really free?
Is wix cheaper than wordpress?
What are the steps should be followed for installing wordpress?
When should you not recommend wordpress to a client?
What's the difference between a blog and a website?
How do I get an ssl certificate?
What is usermeta function in wordpress?
Template files list for development wordpress theme?
What is a mega menu?
How will you create a template page in wordpress?
What is a social menu on wordpress?