array ( "population" => "11,35,000", "captial" => "Bangalore"), "Tamil Nadu" => array("/>
Home / CSE MCQs / PHP MCQs :: Discussion

Discussion :: PHP MCQs

  1. 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"]; ?>
  2. A.
    karnataka 11,35,000
    B.
    11,35,000
    C.
    population 11,35,000
    D.
    karnataka population

    View Answer

    Workspace

    Answer : Option B

    Explanation :

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


Be The First To Comment