PHP array combinations

WhereDenved

New Member
I have an array of 7 numbers (1,2,3,4,5,6,7) and I want to make pairs of 5 numbers like (1,2,3,4,5),(1,2,3,4,6,),(1,2,3,4,7) .(1,2,3,4,5) is equal to (4,5,3,1,2)I would like to know if there is a function in PHP or any algorithm that can do this ?I have no idea where to start from.Can you help me ?I want all the combinations of 7 given numbers ( they are taken from an array ) put into 5 slots,disregarding order
 
Back
Top