Answers for "how to push a new array value to the exiting array in php using for each loop"

PHP
6

add item to array in php

<?php

$a=array("red","green");

array_push($a,"blue","yellow");

print_r($a);
?>
Posted by: Guest on May-25-2020

Code answers related to "how to push a new array value to the exiting array in php using for each loop"

Browse Popular Code Answers by Language