Hi,
this is my code:
<?php
$i=1;
$g1R=10;
$g2R=20;
$g3R=30;
switch ('$g$iR'): --> this syntax does not work!!!
case 10:
echo "it worked";
break;
default:
echo "it did not work";
endswitch;;
?>
I define $g{1,2,3}R as variables and I want to use the switch on them
with $i setting the value of which one of the three will be used. how
do I write the term inside the switch condition?
thanks in advance
this is my code:
<?php
$i=1;
$g1R=10;
$g2R=20;
$g3R=30;
switch ('$g$iR'): --> this syntax does not work!!!
case 10:
echo "it worked";
break;
default:
echo "it did not work";
endswitch;;
?>
I define $g{1,2,3}R as variables and I want to use the switch on them
with $i setting the value of which one of the three will be used. how
do I write the term inside the switch condition?
thanks in advance
Comment