-
What will be the output of the following PHP code?
<?php
$First = array("001" => "Ajit", "002" => "Ats", "003" => "Aju");
echo array_shift($First);
echo "\n";
array_pop($First);
print_r($First);
?>
-
-
Ajit
Array
(
[002] => Ats
) -
Aju
Array
(
[002] => Ats
) - Error
- Nothing
- None of these
-
Correct Option: A
array_shift() removes first element and array_pop() removes the last.