| Previous | Home | Next |
array_push()
The array_push() function inserts one or more elements to the end of an array.
Syntax:array_push(array,value1,value2...)
In above syntax, "array" specifies an array, "value1" specifies the value to add and "value2" specifies the value to add
Example:
<?php
$a=array("Apple","Banana");
array_push($a,"Mango","Orange");
print_r($a);
?>
Output:
| Previous | Home | Next |