I need some logical help on this one.
I have an object which has X settings, which are on/off.
It also can have Y settings which each have Z number of options.
Given the numbers, I want to figure out how many possible combinations of settings there are.
For example,
X=2, Y=2, y[0] = 3, y[1] = 4
So there are two on/off settings, 1 setting with 3 options, and 1 setting with 4 options.
How would I compute the different settings? I have tried several times to create a recursive function for it, but I can't get it to return the output in a way that makes sense. I think I need something similar to this: www.php.net/manual/en/function.shuffle.php#90615
But going above 0 or 1.
is this even possible?