PHP lottery number generator

Joined
May 1, 2012
Messages
1
Reaction score
0
define a php function called kwik_pick which might be used in a lottery program . it takes in a positive interger, $n. it should return an indexed array that contains $n randomly generated intergers in the range 1 to 45 inclusive , ensuring that the array as no duplicates

cnt move past the $n randomly generated numbers.
i know for example if $n = 6 , my code should take that into account and bring out 6 random numbers , but am stuck on how to write that in php
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top