Thread: arrays
View Single Post
  #2 (permalink)  
Old July 28th, 2003, 06:41 AM
Daniel Walker Daniel Walker is offline
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 256
Thanks: 0
Thanked 0 Times in 0 Posts
Default

array_shift and array_push should do this for you. The first will shift your elements up one, with the first element falling off the top of the list. Then array_push, can be used to push that element back on at the bottom.

In fact, PHP has a dizzying set of array functions:
http://www.php.net/manual/en/function.array-shift.php
http://www.php.net/manual/en/function.array-push.php
Reply With Quote