(repost) how can i generate 10 unique (non repeating) numbers

2004-07-22 Thread Absolut Newbie
Hi, (reposting this since i did not see the original in my newsreader or google) I want to generate 10 numbers from 1..15 and put them in an array. easy ? while ($fill 10){ $foo = int(rand(15)); unshift(@array, $foo); $fill++; } print the [EMAIL PROTECTED] is -- @array\n; my problem is

Re: (repost) how can i generate 10 unique (non repeating) numbers

2004-07-22 Thread Flemming Greve Skovengaard
Absolut Newbie wrote: Hi, (reposting this since i did not see the original in my newsreader or google) I want to generate 10 numbers from 1..15 and put them in an array. easy ? while ($fill 10){ $foo = int(rand(15)); unshift(@array, $foo); $fill++; } print the [EMAIL PROTECTED] is -- @array\n;

Re: (repost) how can i generate 10 unique (non repeating) numbers

2004-07-22 Thread Peter Scott
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Absolut Newbie) writes: [snip] how can i generate 10 unique (non repeating) numbers from a range to put in the array ? http://groups.google.com/groups?hl=enlr=ie=UTF-8selm=86hds1fa6n.fsf%40blue.stonehenge.com -- Peter Scott