array( "Salary" => "2,40,000", "Designation" => "Software Engineer"),"Sumi"> What will be the output of the following php code?<?php$Employee

Home » PHP » PHP Multidimensional Arrays » Question
  1. What will be the output of the following php code?
    <?php
    $Employee = array("Ajit" => array
    ( "Salary" => "2,40,000", "Designation" => "Software Engineer"),
    "Sumi Sharma" => array( "Salary" => "3,00,000",
    "Designation" => "Software Developer") );
    echo $Employee["Ajit"]["Salary"];
    ?>
    1. Error
    2. Ajit 2,40,000
    3. Ajit Sumi Sharma
    4. 2,40,000
    5. None of these
Correct Option: D

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



Your comments will be displayed only after manual approval.