ok...
I have a multi-dimensional array that is completely dynamic in the size of it's attributes.
Here's an example of how part of one is set up:
$specs = array();
$specs[0][name] = "DC Connector";
$specs[0][options][0][value] = "DC";
$specs[0][options][0][description] = "DuraCon";
$specs[1][name] = "Insulator Type";
$specs[1][options][0][value] = "D";
$specs[1][options][0][description] = "Thermoplastic Glass Reinforced";
$specs[2][name] = "No. of Contacts";
$specs[2][options][0][value] = "9";
$specs[2][options][1][value] = "15";
$specs[2][options][2][value] = "21";
$specs[2][options][3][value] = "25";
$specs[2][options][4][value] = "31";
$specs[2][options][5][value] = "37";
$specs[2][options][6][value] = "51";
$specs[3][name] = "Contact Type";
$specs[3][options][0][value] = "P";
$specs[3][options][0][description] = "Pin (Plug)";
$specs[3][options][1][value] = "2";
$specs[3][options][1][description] = "Socket (Receptacle)";
As you might have guessed, this array is used to populate a dynamic number of select boxes.
The first show option for the user is a dash, meaning no selection for that option set.
Let's say the user selects 5 of the X options, and wants to see all remaining combinations, using what he/she has selected, and looping through all the possibilities of what he/she/ didnt select...
I know, this is a lot to take in...
With a static number of option sets, lets say 6, I know that I could put 6 for loops, all within each other
for() {
for () {
for () {
etc
However, with an unknown number of option sets (select boxes), and an unknown number of options within each of those option sets, how can I loop through everything and generate all remaining combinations?
Thank you all in advance for your assistance - I really appreciate it
-=Lazzerous=-