note 102704 added to function.array-rand
| From: | anilesh dot sharma at gmail dot com | Date: | Tue, 01 Mar 2011 15:46:52 +0000 |
| Subject: | note 102704 added to function.array-rand | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-177449@lists.php.net to get a copy of this message | ||
Can anyone please suggest me a solution for the following?
I wish to develop a method which will randomly distribute 'n' objects to 'm'
containers.
To give a better feel, I want to distribute m coins among n(which is <m) people so that each gets
int(m/n) coins.
What is the fastest method which can be employed?
----
Server IP: 59.162.86.8
Probable Submitter: 210.212.148.38
----
Manual Page -- http://www.php.net/manual/en/function.array-rand.php
Edit -- https://master.php.net/note/edit/102704
Del: integrated -- https://master.php.net/note/delete/102704/integrated
Del: useless -- https://master.php.net/note/delete/102704/useless
Del: bad code -- https://master.php.net/note/delete/102704/bad+code
Del: spam -- https://master.php.net/note/delete/102704/spam
Del: non-english -- https://master.php.net/note/delete/102704/non-english
Del: in docs -- https://master.php.net/note/delete/102704/in+docs
Del: other reasons-- https://master.php.net/note/delete/102704
Reject -- https://master.php.net/note/reject/102704
Search -- https://master.php.net/manage/user-notes.php