• We are available for any Development work:
  • Email us at: programmer_heart@yahoo.com

How to add new item to beginning of array in php

You can do this by following little code in php
$arr = array('value1','value2');
array_unshift($arr, "value0");
print_r($queue);
The above example will output:
Array
(
[0] =>value0
[1] =>value1
[2] =>value2
)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current day month ye@r *

Press Enter to Search