?
What will be the output of the following PHP code?
What will be the output of the following PHP code?
<?php
$a = array("red", "green", "blue");
array_pop($a);
print_r($a);
?>
<?php
$a = array("red", "green", "blue");
array_pop($a);
print_r($a);
?>
Answer & Solution
Correct Answer:
Option
A
The array_pop() function deletes the last element of an array.
Join the Discussion
Login to post a comment or share your explanation.
Login