Question
<?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
Posted under PHP
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What will be the output of the following php code?
Similar Questions
Discover Related MCQs
Q. Which function will return true if a variable is an array or false if it is not?
View solution
Q. Which in-built function will add a value to the end of an array?
View solution
Q. Which function can be used to move the pointer to the previous array position?
View solution
Q. Which function returns an array consisting of associative key/value pairs?
View solution
Q. Which of the functions is used to sort an array in descending order?
View solution
Q. Which one of the following PHP functions can be used to build a function that accepts any number of arguments?
View solution
Q. Which one of the following PHP functions can be used to find files?
View solution
Q. Which of the following PHP functions can be used to get the current memory usage?
View solution
Q. Which of the following PHP functions can be used for generating unique ids?
View solution
Q. Which one of the following functions can be used to compress a string?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond PHP? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!