How to insert value in array php?

The php array_push() function inserts one or more elements to the end of an php array.


$a=array("one","two");
array_push($a,"three","four");
print_r($a);
//Array ( [0] => one[1] => two[2] => three[3] => four)

Comments

Leave a Reply