Then push the name of the file, $n times into a selection array. When done filling the processing array, just randomly select from the array.
In reply to Re: Efficiently selecting a random, weighted element
by zentara
in thread Efficiently selecting a random, weighted element
by jimt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |