/*Function array_push(): Push one or more units Push into the end of the array (push into the stack)
* 1. Syntax: int array_push (array &array, mixed var [, mixed ...])
* 2. Description: Treat array as a stack and pass in The variable is pushed to the end of the array. The length of array will increase according to the number of variables pushed onto the stack.
* 3. Notes:
* 3.1. This function returns the total number of new elements in the array
* 3.2. If var is an array, the array is pushed into the array stack as an array variable. That is, the length of the original array is increased by one unit
*/
echo "****************************** **********************************************
";
$arr11=array('Grade 1'=>65,'Grade 2'=>25,'Grade 3'=>87,'Grade 4'=>85,'Grade 5'=> ;45,'score 6'=>66);
$arr22=array(a,b,c,d,e);
echo "Information of array arr11:";
echo "< ;pre>"; <br>print_r($arr11); <br>echo "";
echo "Information of array arr22:";
echo "
"; <br>print_r($arr22); <br>echo "
";
echo "The original number of elements in array arr1 is: ".count($arr11)."
";
$num1=array_push($arr11,12,55,66,100);
echo "After pushing onto the stack, the total number of elements in the array is: ".$num1."! The elements of the array at this time They are:
";
echo "
"; <br>print_r($arr11); <br>echo "
";
$num2=array_push ($arr11,$arr22);
echo "After array arr22 is pushed onto array arr11:";
echo "After being pushed onto the stack, the total number of elements in the array is: ".$num2."! This The elements of the array are:
";
echo "
"; <br>print_r($arr11); <br>echo "
";
?>