note 123667 added to function.array-shift
| From: | vasiliauskas dot agnius at gmail dot com | Date: | Thu, 07 Mar 2019 20:37:42 +0000 |
| Subject: | note 123667 added to function.array-shift | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-210335@lists.php.net to get a copy of this message | ||
Sometimes instead of shuffling array you just need to rotate it. We can easily rotate left an array
with such code:
<?php
$arr[] = array_shift($arr);
?>
----
Server IP: 208.43.231.9
Probable Submitter: 185.85.3.142 (proxied: 5.20.182.75)
----
Manual Page -- http://php.net/manual/en/function.array-shift.php
Edit -- https://master.php.net/note/edit/123667
Del: integrated -- https://master.php.net/note/delete/123667/integrated
Del: useless -- https://master.php.net/note/delete/123667/useless
Del: bad code -- https://master.php.net/note/delete/123667/bad+code
Del: spam -- https://master.php.net/note/delete/123667/spam
Del: non-english -- https://master.php.net/note/delete/123667/non-english
Del: in docs -- https://master.php.net/note/delete/123667/in+docs
Del: other reasons-- https://master.php.net/note/delete/123667
Reject -- https://master.php.net/note/reject/123667
Search -- https://master.php.net/manage/user-notes.php