push to bgining of array php code example
Example: php add element to array first position
<?php
$queue = array("orange", "banana");
array_unshift($queue, "apple", "raspberry");
print_r($queue);
?>
Array
(
[0] => apple
[1] => raspberry
[2] => orange
[3] => banana
)