Why isn't this working?
$i=3; $test{$i} = "TESTING"; echo $test3;
shouldn't it output TESTING?
It's going into an array.
echo $test[3]; // prints TESTING
Originally posted by Benpsycho $test{$i} [/B]
Originally posted by Benpsycho
$test{$i}
[/B]
You mean
${'test'.$i}
- build a string and use it as the name of a variable.