I need to make PHP variables all starting with $hex followed by numbers 1-8.
In a loop, can I concatenate the increment, i
, with the variable, like this:
$hex . i
Or will that not work?
EDIT: never mind, I figured it out: ${ }
I need to make PHP variables all starting with $hex followed by numbers 1-8.
In a loop, can I concatenate the increment, i
, with the variable, like this:
$hex . i
Or will that not work?
EDIT: never mind, I figured it out: ${ }
Maybe you could use eval php function:
eval('$hex'. $i . ';');