How would I create a loop where I can call $var1, $var2,$var3 in this format?
<?php for ($i = 1; $i <= 3; $i += 1) { echo $var . $i; } ?>
With variable variables that would be:
for ($i = 1; $i <= 3; $i += 1) { echo ${'var' . $i}; }
But I suggest that you use an array instead.
Thanks for the variable variables laserlight and the suggestion.