views:

406

answers:

1

What is the most efficient way to generate all the combinations, dispositions and permutations of an array in PHP?

+1  A: 

Here is code to get all permutations:

http://www.php.net/manual/en/function.shuffle.php#90615

With the code to get the power set, permutations are those of maximal length, the power set should be all combinations. I have no idea what dispositions are, so if you can explain them, that would help.

Victor Liu
good research VL
memnoch_proxy