The phparray_pop () array function pops up the last unit of the array (output stack) _ PHP Tutorial.

Source: Internet
Author: User
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 '...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.