I want to store courseworks marks of n courseworks into n variables, such as cw1 and cw2 etc. Using variable variables how can I come with cw1, cw2 etc.
How can I d
php > for ($i=0; $i<5; $i++) { ${"thing{$i}"} = $i; } php > echo $thing1; 1 php > echo $thing2; 2 php > echo $thing3; 3
Note that we're using the dollar sign around curly braces around a string.