PHP array function sample series -- the last cell function array_pop of the array is displayed.

Source: Internet
Author: User
Mixedarray_pop (array & amp; $ array) function: array_pop & nbsp; & mdash; & nbsp; displays the last unit of the array (output stack). description: array_pop () & nbsp; the last cell of the & nbsp; array is displayed, and the array & nbsp; array & nbs
Mixed array_pop (array & $ array)

Function: array_pop? -? Bring up the last unit of the array (Out Stack)

Description: array_pop ()? Pop up and return?Array? The last unit of the array, and the array?Array? Length minus one. If?Array? If it is null (or not an array), will it return?NULL.

Note: when this function is used, it will reset () array? Pointer.

Parameter: array of input operations.

Return value: returns the last element of the array. If the array is empty, NULL is returned.

Example:

 

Running result:

PearArray ([0] => apple [1] => orange)

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.