RE: [PHP] Generate every possible combination

2002-05-16 Thread Lance Lovette
} } else { $retval[] = implode($glue, $a); } } -Original Message- From: Evan Nemerson [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 16, 2002 12:17 AM To: [EMAIL PROTECTED] Subject: [PHP] Generate every possible combination I need to generate ev

RE: [PHP] Generate every possible combination

2002-05-15 Thread Martin Towell
o:[EMAIL PROTECTED]] Sent: Thursday, May 16, 2002 2:17 PM To: [EMAIL PROTECTED] Subject: [PHP] Generate every possible combination I need to generate every possible combination of the the values in an array. For example, if... $array = Array("A", "B", "C"); I want

[PHP] Generate every possible combination

2002-05-15 Thread Evan Nemerson
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" [2] => "BAC"