Answers for "php array add element on top of array"

PHP
0

php array add element on top of array

<?php

$a=array("a"=>"red","b"=>"green");
array_unshift($a,"blue");
print_r($a);

?>
Posted by: Guest on August-25-2021

Browse Popular Code Answers by Language