Push one or more elements onto the end of array : array_push « Data Structure « PHP






Push one or more elements onto the end of array

 
<?
$stack = array (1, 2);
array_push($stack, "+", 3);
?>
  
  








Related examples in the same category

1.Adding an Element to the End of an Array
2.Adding array elements
3.array_push( ) pushes value onto the end of the array
4.array_push() function appends one or more values onto the end of the array.
5.Push one or more elements onto the beginning of array