Great that I found this place. I wonder if you guys could help me with this issue:
I have a number of elements, for the sake of simplicity let's call them: AAA, BBB, CCC, DDD and EEE. In reality, there may be hundred of these bastards but here let's take only five...
They are put in an array, like so:
Code: Select all
$elements=array("AAA","BBB","CCC","DDD","EEE");
Code: Select all
$combinations=array(
array=("AAA","BBB","CCC","DDD","EEE"),
array=("BBB","EEE","AAA","CCC","DDD"),
array=("AAA","AAA","CCC","EEE","EEE"),
);
Obviously the job is to write up all any any possible combinations of these elements into this $combinations array. How do you think would be the most effective way to do this?
Thanks for any help...