[PHP] Re: Generate every possible combination

2002-05-16 Thread Martin Wickman
Evan Nemerson wrote: I need to generate every possible combination of the the values in an array. For example, if... $array = Array(A, B, C); I really have no idea where to begin. The best lead I can think of is that there are going to be n! elements in the output array, where n is the

[PHP] Re: Generate every possible combination

2002-05-15 Thread Austin Marshall
Evan Nemerson wrote: I need to generate every possible combination of the the values in an array. For example, if... $array = Array(A, B, C); I want to be able to do something like print_r(magic_function($array)); which would output Array ( [0] = ABC [1] = ACB

[PHP] Re: Generate every possible combination

2002-05-15 Thread Austin Marshall
Austin Marshall wrote: Evan Nemerson wrote: I need to generate every possible combination of the the values in an array. For example, if... $array = Array(A, B, C); I want to be able to do something like print_r(magic_function($array)); which would output Array ( [0] = ABC