array issues
Posted: Mon May 21, 2007 1:35 am
I have an array that will have several possiblities, such as a1-a12 and b1-b48 and c1-c128 yadda yadda.
My question would be, if each of these represents a different unique index.html file in a seperate directory,
ie, ./this/place/b1/index.html + /this/place/b2/index.html
but /that/place/a1/index.html
so, all the b numbers are found in /this/place/ and all the a numbers are found in /that/place/
is there a way to make a switch statement include that file?
my psedo-code
the goal of this is to avoid several hundred switch cases, like a case for a1 a2 a3 a4 and so on.
My question would be, if each of these represents a different unique index.html file in a seperate directory,
ie, ./this/place/b1/index.html + /this/place/b2/index.html
but /that/place/a1/index.html
so, all the b numbers are found in /this/place/ and all the a numbers are found in /that/place/
is there a way to make a switch statement include that file?
my psedo-code
Code: Select all
$some_value = the desired page, such as a11
switch (array($some_value)){
case array(any a number value):
include ("/that/place/any a number value/index.html");
break;
case array(any b number value):
include ("/this/place/any b number value/index.html");
break;
}