, $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 every possible combination of the the values in an array.
For example, if...
$array = Array(A, B, C
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
[3] = BCA
: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 to be able to do something like
print_r(magic_function($array));
which would output
3 matches
Mail list logo