PHP array_pop() Function
Complete 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+ |
Complete PHP Array Reference Manual