note 102704 added to function.array-rand

[email protected] Tue, 1 Mar 2011 07:46:52 -0800
Newsgroups php.notes
Message-ID <[email protected]>
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