Hi, I'm new here and I know this is a noob question but I'm interested in how to do this. I'm learning php basics. I know how arrays, integers and strings work. I can do if conditions and for or while loops.
My problem is:
I have got 80 numbers (1-80)
And I would like to list all combinations of number-picking if
1. I can choose 10 numbers from the 80 and I can only pick a number once.
2. The same but only with 20 numbers.
I would like to list these two cases. I'm very interested in how to use these. Oh and I would also like to put all these veriations into and array, like... possibilities[0] = "1-2-3-4-5-6-7-8-9-10", possibilities[0] = "1-2-3-4-5-6-7-8-9-11" and so on.
Thank you in advance.
Noob mathematical question
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Noob mathematical question
There are a large number of possible combinations. I am not sure what you are doing, but you would probably be better to limit the combinations by checking for duplicates. What are you trying to do?hegerp wrote:And I would like to list all combinations of number-picking if
(#10850)