Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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?



Explain how come the code <?php print contents: $arr[1]; ?> Works, but <?php print contents..

Answer / Gaurav Singhal

The code <code>&lt;?php print contents: $arr[1]; ?&gt;</code> works because $arr[1] accesses a single element of the one-dimensional array. However, the code <code>&lt;?php print contents: $arr[1][2]; ?&gt;</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

Post New Answer

More WordPress Interview Questions

Tell me in php, what are magic methods and how are they used?

1 Answers  


What are posts?

1 Answers  


Described ternary conditional operator in PHP?

1 Answers  


What encryption does wordpress use?

1 Answers  


What is the Alternative CMS of WordPress?

1 Answers  


Explain me how do I prevent comment flooding?

1 Answers  


How do I create a subdomain for my website?

1 Answers  


What is default table prefix for wordpress?

1 Answers  


How to update a wordpress site?

1 Answers  


How do I backup a wordpress website?

1 Answers  


what’s the difference between site_url() and home_url()?

1 Answers  


Where is wordpress media stored?

1 Answers  


Categories