October 2005
Intermediate to advanced
372 pages
11h 35m
English
array_pop()
mixed array_pop ( array &arr )The array_pop()
function takes an array as its only parameter, and returns the value from the end of the array while also removing it from the array. For example:
$names = array("Timmy", "Bobby", "Sam", "Tammy", "Joe");
$firstname = array_pop($names);
// first is Timmy; last is Joe again