Monday, 9 September 2013

random numbers in order + unique php

random numbers in order + unique php

I am trying to create a random number generator which has the following
features:
Each one is unique
Numbers are either 1 or 49 and all in between
Ordered from lowest to highest
This is what I have so far
$numbers = rand(1, 49)." ".rand(1, 49)." ".rand(1, 49)." ".rand(1, 49)."
".rand(1, 49)." ".rand(1, 49);
echo "Your Lucky Lotto Numbers Are: ".$numbers;
Im just not quite sure how to go about ordering them, plus the numbers
being unique.

No comments:

Post a Comment