Current Location: Home> Function Categories> array_pop

array_pop

Pop up the last unit of the array (out of the stack)
Name:array_pop
Category:Array
Programming Language:php
One-line Description:Delete the last element of the array (out of the stack).

Definition and usage

array_pop() function deletes the last element in the array.

Example

Delete the last element in the array

 <?php
$a = array ( "red" , "green" , "blue" ) ;
array_pop ( $a ) ;
print_r ( $a ) ;
?>

Try it yourself

grammar

 array_pop ( array )
parameter describe
array Required. Specify array.
Similar Functions
Popular Articles