Home » PHP » PHP Sorting Arrays » Question
  1. What will be the output of the following PHP code?
    <?php
    $Country = array("INDIA", "USA", "ENGLAND");
    array_pop($Country);
    $Country1 = array("ISRAEL");
    $Country = array_merge($Country, $Country1);
    print_r($Country);
    ?>
    1. Nothing
    2. Array
      (
      [0] => INDIA
      [1] => USA
      [2] => ISRAEL
      )
    3. Array
      (
      [0] => INDIA
      )
    4. Error
    5. None of these
Correct Option: B

array_merge() and array_pop() yields that result.



Your comments will be displayed only after manual approval.