array ( "population" => "11,35,000", "captial" ="> What will be the output of the following php code? < ?php $states = arra array ( "population" => "11,35,000", "captial" ="> array ( "population" => "11,35,000", "captial" =" /> array ( "population" => "11,35,000", "captial" =" />
Sail E0 Webinar
Question
What 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"];
?>
Options:
A .  karnataka 11,35,000
B .  11,35,000
C .  population 11,35,000
D .  karnataka population
Answer: Option B


Treat states as a multidimensional array and accordingly traverse it to get the value.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

More Questions on This Topic :


Latest Videos

Latest Test Papers