Hello Everyone.
I found this site after a lot of Google research. I’m working on a project and need direction. My php skills are terrible as I’m just starting and figuring out what everything means and how it all works together.
So here’s my project…which I think I am over complicating.
It’s kind of like a lottery number generator but uses employee ID numbers, a limited range of numbers, and an array of selected numbers.
- I want the code to select a random number from a range… maybe 85% of the time.
- Sometimes select a number from an array of employee numbers. 10%
- Sometimes select a number from an array of selected numbers. 5%
- Compare the selected number to the employee numbers array and the selected numbers array.
- If there’s a match, then display “MATCH” plus the number (Helps me so I don’t have to verify if a number is a winning number or not.)
- If no match, then just display the number.
It seems like it should be simple enough, but seeing how there are about 10 different ways to write code to generate a random number…simple to complicated, I’m having lots of issues.