insert value inot aray in php code example
Example 1: php add element to array
<?php
$stack = array("orange", "banana");
array_push($stack, "apple", "raspberry");
?>
Example 2: array_push in php
<?php
// Insert "blue" and "yellow" to the end of an array:
$a=array("red","green");
array_push($a,"blue","yellow");
print_r($a);
?>