Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP array_pop() Function

PHP array_pop() Function

PHP Array ReferenceComplete PHP Array Reference Manual

Example

Delete the last element of an array:

Run Example »


Definition and Usage

The array_pop() function deletes the last element of an array.


Syntax

array_pop(

array

)

Parameters Description
array Required. Specifies the array.

Technical Details

Return Value: Returnarraysthe last value. Ifarraysis empty, or is not an array, NULL is returned.
PHP Version: 4+

PHP Array ReferenceComplete PHP Array Reference Manual