Is it possible to reference a variable using another variable in the name.
for example..
just say i have five variables..
$d_1='dude';
$d_2='wotever';
$d_3='i rock, but im not made of stone';
$d_4='ffs work';
$d_5='carn ya carnie';
just say i want to use a for loop to output the vars..
$top=5;
for($i=1;$i < $top;$i++)
{
echo $d_$i;
}
it errors....... I have tried
echo $d_{$i};
but no go..
I cannot use an array for other reasons..
Is there a way of doing it?
Cheers..
Snorcha