unshift in php code example
Example 1: array unshift php
<?php
$a=array("a"=>"red","b"=>"green");
array_unshift($a,"blue");
print_r($a);
?>
Example 2: unshift in php
<?php
$a=array("a"=>"red","b"=>"green");
array_unshift($a,"blue");
print_r($a);
// result : Array ( [0] => blue [a] => red [b] => green )
?>