Beyond The Basics?

shift and unshift chops/prepends the beginning of the array

\n"; /* shift a value from an array */ $a = array_shift($arr); echo $a . "

\n"; /* unshift an element, this func returns the element count */ $c = array_unshift($arr, $a); print_r($arr); echo "

\n"; ?> pop and push

\n"; /* push back an element, this func returns the element count */ $c = array_push($arr, "foo"); $c = array_push($arr, "bar"); print_r($arr); ?>