array_pop()函数删除并返回数组的最后一个元素。其形式为:
mixed array_pop(aray target_array);
下面的例子从$states数组删除了最后的一个州:
$fruits = array("apple","banana","orange","pear"); $fruit = array_pop($fruits); //$fruits = array("apple","banana","orange"); //$fruit = "pear";