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