Hi,
Is it possible to name variables on the fly
e.g.
for ($x = 1; $x <= 6; $x++){ $variable$x = $x;
}
sort of thing?
To give: $variable1 = 1 $variable2 = 2 etc
PHP complains when I do this. Is there a way?
Graham
for ($x = 1; $x <= 6; $x++){ ${"variable$x"} = $x;
Many thanks James. Much appreciated.
Everyday is a school day for me 8-)