Discussion :: PHP - CS
-
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"];
?>
Answer : Option B
Explanation :
Treat states as a multidimensional array and accordingly traverse it to get the value.
Be The First To Comment