Copy CodeThe code is as follows:
/* Function Array_push (): Presses one or more cells into the end of the array (into the stack)
* 1, Syntax: int array_push (array &array, mixed var [, mixed ...])
* 2, Description: The array is treated as a stack, and the incoming variable is pressed into the end of the array. The length of the array will increase depending on the number of variables that are in the stack.
* 3. Precautions:
* 3.1, the function returns the total number of new elements in the array
* 3.2, such as an array of Var, the array is used as a variable in the stack into the array stack, that is, the length of the original array is to add a unit
*/
echo "***********************************************************************
";
$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 "
echo "
";
echo "Array arr22 information:";
echo "
echo "
";
echo "Array arr1 the number of original elements is:". Count ($arr 11). "
";
$num 1=array_push ($arr 11,12,55,66,100);
echo "In the stack, the total number of elements of the array is:". $num 1. "! The elements of this array are:
";
echo "
echo "
";
$num 2=array_push ($arr, $arr 22);
echo "Array arr22 into the stack after array arr11:";
echo "In the stack, the total number of elements of the array is:". $num 2. "! The elements of this array are:
";
echo "
echo "
";
?>
The results of the operation are as follows:
http://www.bkjia.com/PHPjc/323845.html www.bkjia.com true http://www.bkjia.com/PHPjc/323845.html techarticle Copy the code as follows:? PHP/* Function Array_push (): Press one or more cells into the end of the array (into the stack) * 1, Syntax: int array_push (array lt;br "; $arr 11=array (' score 1 ' = ...