Forum Moderators: coopster
another function we could add to the script is the ability to pick numbers from a form and see if a user has 2 numbers matching the generated 3,4, etc
thanx
[php.net...]
now user puts in his/her 5 numbers.
the function i want is one that will check the 5 numbers that the user has entered, then cross check it with the 5 numbers generated by the rand() function.
the function should also count how many numbers that the user entered, match with the pre-existing ones created by the system
i hope i was very clear.
you have all been very helpfull
Perhaps array_intersect [php.net] is the missing piece of the puzzle? :)
If not, surely one of the array functions will do the trick. I originally figured that array_search would do the trick, but array_intersect looks more elegant.