note 117943 added to array.sorting
| From: | gmm at ibizmktg dot com | Date: | Fri, 04 Sep 2015 20:44:13 +0000 |
| Subject: | note 117943 added to array.sorting | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-203685@lists.php.net to get a copy of this message | ||
Hey I may be stupid or something... but I have a user situation where they put the order numbers in
for the pictures they wish to display on the site.
I have a php/MySQL system and a simple sort to keep them straight.
But I have run into a situation where I wish to reorganize their photos on the page and I can not
trust the numbers they input... they may put in 1,3,5,8,9... and this will of course put their
photos in the right order... but I wish to select them by their sort order... you know 0,1,2,3,4 so
I can make sure to always get the picture they mean to appear first, second, third... etc.
But I have been searching for two days for this simple code which I know I learned a long time ago
but have lost in the recesses of my mind...
Can anyone give me a nudge in the right direction?
Thanks
----
Server IP: 72.52.91.14
Probable Submitter: 2602:306:b8ec:9d70:add8:790:d3d:d82a
----
Manual Page -- http://php.net/manual/en/array.sorting.php
Edit -- https://master.php.net/note/edit/117943
Del: integrated -- https://master.php.net/note/delete/117943/integrated
Del: useless -- https://master.php.net/note/delete/117943/useless
Del: bad code -- https://master.php.net/note/delete/117943/bad+code
Del: spam -- https://master.php.net/note/delete/117943/spam
Del: non-english -- https://master.php.net/note/delete/117943/non-english
Del: in docs -- https://master.php.net/note/delete/117943/in+docs
Del: other reasons-- https://master.php.net/note/delete/117943
Reject -- https://master.php.net/note/reject/117943
Search -- https://master.php.net/manage/user-notes.php