Copy Code code as follows:
<?php
/* Function Array_push (): Pressing one or more cells into the end of the array (on stack)
* 1, Syntax: int array_push (array &array, mixed var [, mixed ...])
* 2, Description: The array as a stack, and the incoming variable pressed into the end of the array. The length of the array increases according to the number of stack variables.
* 3, the attention matters:
* 3.1, this function returns the total number of new elements of the array
* 3.2, such as Var is an array, the array is used as a variable into the stack into the array stack, that is, the length of the original array is to add a cell
*/
echo "***********************************************************************<br>";
$arr 11=array (' score 1 ' =>65, ' score 2 ' =>25, ' score 3 ' =>87, ' score 4 ' =>85, ' score 5 ' =>45, ' score 6 ' =>66);
$arr 22=array (a,b,c,d,e);
echo "Array arr11 information:";
echo "<pre>";
Print_r ($arr 11);
echo "</pre>";
echo "Array arr22 information:";
echo "<pre>";
Print_r ($arr 22);
echo "</pre>";
echo "Array arr1 the number of original elements:". Count ($arr 11). <br/> ";
$num 1=array_push ($arr 11,12,55,66,100);
echo "After the stack, the total number of elements of the array is:". $num 1. "! At this time the elements of the array are: <br/> ";
echo "<pre>";
Print_r ($arr 11);
echo "</pre>";
$num 2=array_push ($arr, $arr 22);
echo "Array arr22 into stack to Arr11 after array:";
echo "After the stack, the total number of elements of the array is:". $num 2. "! At this time the elements of the array are: <br/> ";
echo "<pre>";
Print_r ($arr 11);
echo "</pre>";
?>
The results of the operation are as follows: