note 52064 added to function.array-shift
| From: | arturo{dot}ronchi{at}gmail{dot}com at osu1 dot php dot net | Date: | Wed, 20 Apr 2005 13:24:33 +0000 |
| Subject: | note 52064 added to function.array-shift | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-88259@lists.php.net to get a copy of this message | ||
Here is a little function if you would like to get the top element and rotate the array afterwards.
function array_rotate(&$arr)
{
$elm = array_shift($arr);
array_push($arr, $elm);
return $elm;
}
----
Manual Page -- http://www.php.net/manual/en/function.array-shift.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+52064
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52064&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52064&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52064&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52064&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52064&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+52064&report=yes
Search -- http://master.php.net/manage/user-notes.php