The phparray_pop () array function pops up the last cell of the array (output stack ). Copy the code as follows :? Php * function array_pop (): Bring up the last unit of the array (output stack) * 1. Syntax: mixedarray_pop (arraylt; br; $ arr11array (score 165, SCORE 2)
The code is as follows:
/* Function array_pop (): pops up the last unit of the array (output stack)
* 1. Syntax: mixed array_pop (array & array)
* 2. Description: The last unit of the array is displayed, and the length of the array is reduced by one. If array is NULL (or not an array), NULL is returned.
* 3. notes:
* 3.1,
*/
Echo "************************************** *********************************
";
$ Arr11 = array ('score 1' => 65, 'Score 2' => 25, 'Score 3' => 87, 'Score 4' => 85, 'score 5' => 45, 'Score 6' => 66 );
$ Arr22 = array (a, B, c, d, e );
Echo "array arr11 information :";
Echo"
";
print_r($arr11);
echo "
";
$ Num = count ($ arr11 );
For ($ I = 0; $ I <$ num; $ I ++ ){
Echo "the last element of the pop-up array is:". array_pop ($ arr11 )."
";
Echo "the array arr11 information after a last element is popped up :";
Echo"
";
print_r($arr11);
echo "
";
Echo"
";
}
?>
The http://www.bkjia.com/PHPjc/323848.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/323848.htmlTechArticle code is as follows :? Php/* function array_pop (): Bring up the last unit of the array (output stack) * 1. Syntax: mixed array_pop (array lt; br "; $ arr11 = array ('score 1' = 65, 'Score 2 '...