Lottery numbers
- Generate an array with 6 different, random lottery numbers between 1 and 45, sorted from small to large
- Show the generated numbers in an unordered list
Tips
- Use the PHP function
mt_rand()for random number generation- For sorting indexed arrays, you can use the
sort()method, which - in contrast toasort()- does not maintain index association