Output: Array">
array_pop() definition and usage
array_pop() function deletes the last element in the array.
Syntax
array_pop(array) Parameter Description
array Required. Specifies the input array parameters.
Example
Copy codeThe code is as follows:
$a=array("Dog","Cat","Horse");
array_pop($a);
print_r($ a);
?>
The above has introduced colesafearray PHP array function sequence array_pop - delete the last element in the array, including colesafearray content. I hope it will be helpful to friends who are interested in PHP tutorials.