What will be the output of the following PHP code?
<?php
$states = array(“Karnataka” => array
(“population” => “11,35,000”, “capital” => “Bangalore”),
“Tamil Nadu” => array( “population” => “17,90,000”,
“capital” => “Chennai”) );
echo $states[“Karnataka”][“population”];
?>
a) Karnataka 11,35,000
b) 11,35,000
c) population 11,35,000
d) Karnataka population
Answer: b
Explanation: In the following PHP code, the variable states are treated as a multidimensional array and accordingly traverse it to get the value of ‘Karnataka’s population’.
Related Posts
What are the portability concerns founded in Seeheim model?
Which of the following is the main task accomplished by the user?
Which among the following are the functions that any system with a user interface must provide?
The _____________ system is widely used for mapping from Java objects to relations.
The ______________ layer, which provides the interface between the business-logic layer and the underlying database.
The _____________ layer, which provides a high-level view of data and actions on data.
Which layer deals which deals with user interaction is called _____________ layer.
Join The Discussion