hello all....

I need some code that will take 7 - 49 numbers (for the lotto)
that the user chooses and spit out all the different 3 number combinations and then all the different 6 number combinations
ie.
1 2 3 4 5 6 7

would be..

123
124
125
126
127
134
135
136
137 and so on

and then the would need to be combined into

123 456
123 457

the more numbers the user chooses the longer the list would be obviosly, any way
any one know the best way to do this?
thanks in advance
jon