"> What will be the output of the following PHP code?<?php$Country

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

The array_pop() function deletes the last element of an array.



Your comments will be displayed only after manual approval.