MCQ
Single Best Answer
Not Set
QWhat will be the output of the following php code?
< ?php
$states = array("karnataka" => array
( "population" => "11,35,000", "captial" => "Bangalore"),
"Tamil Nadu" => array( "population" => "17,90,000",
"captial" => "Chennai") );
echo $states["karnataka"]["population"];
?>
ID: #2382
Arrays in PHP MCQ
861 views
Question Info
#2382Q ID
Not SetDifficulty
Arrays in PHP MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option B
Explanation
Treat states as a multidimensional array and accordingly traverse it to get the value.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic