|
Posted by Michael Fesser on 01/03/07 21:05
..oO(Ted)
>I have a small pre-determined number of possible values for a variable, and
>I would like to set a value for the corresponding 'switch type' variable.
>
>For example, if $x is 14, I want to execute the following statement:
> $switch_14 = "on";
>
>In general, I want something like this:
> $switch_.$x = "on";
You're looking for an array:
$switch[$x] = TRUE;
Micha
Navigation:
[Reply to this message]
|