I have a list of variables to add together:
$sum = $a1 + $a2 + $a3 ...
As you can see, the are sequentially numbered. Is there a way for me to do a loop to add them together?
Something like:
for ($i=0; $i<20; $i++){
$sum = $sum + ${"a".$i}
}
... but that works?