From http://www.w3schools.com (Copyright Refsnes Data)
Complete PHP Array Reference
The array_pop() function deletes the last element of an array.
array_pop(array) |
| Parameter | Description |
|---|---|
| array | Required. Specifies an array |
<?php
$a=array("Dog","Cat","Horse");
array_pop($a);
print_r($a);
?>
|
The output of the code above will be:
Array ( [0] => Dog [1] => Cat ) |
Complete PHP Array Reference
From http://www.w3schools.com (Copyright Refsnes Data)