Easy just use variable variables.
say you have 5 variables :
$var1="A"
$var2="B"
$var3="C"
$var4="D"
$var5="E"
to display the contents you can use
for ( $loop=1; $loop<=5; $loop++ )
{
$$varname="var".$loop;
echo ${$varname}."<BR>";
}
you should get on screen
A
B
C
D
E
Mark.