From: Kyle Schmitt Date: 2007-08-31T01:32:36+09:00 Subject: Re: Need help randomly selecting unique values from an array You could port this code over from C... http://xkcd.com/221/ OK ok seriously though. rand(foo.length) will randomly pick any one of them, but you want to ignore index zero so rand(foo.length -1 ) + 1 should do the trick. This is a slightly... stupid way of doing it, but considering the size of the data, it's a choice of what's more stupid, generating random numbers until you get two that aren't the same, or something like this.. number1 = foo[rand(foo.length-1)+1] foo2=foo-[number1] number2 = foo2[rand(foo2.length-1)+1]