Home » PHP » PHP Multidimensional Arrays » Question
  1. What will be the output of the following PHP code?
    <?php
    $Employee = array("Ajit", "Rahul", "Ats");
    $id = array("001", "002", "003");
    $pro = array_combine($id, $Employee);
    print_r($pro);
    ?>
    1. Array
      (
      [001] => Ajit
      [002] => Rahul
      [003] => Ats
      )
    2. Error
    3. Nothing
    4. Array
      (
      [001]
      [002]
      [003]
      )
    5. None of these
Correct Option: A

Here “keys” array is $id and “values” array is $Employee .



Your comments will be displayed only after manual approval.