Hi,
I'm sure this problem won't twist too many brains, at least not like it has twisted mine 😕
Here's a simplified version of what I'm trying to do:
$x = '50';
for ($i=0; $i < 4; $i++) {
$num = $x;
echo "<p>Total = $num";
}
This will output this:
Total = 50
Total = 50
Total = 50
Total = 50
My question is, how do go about keeping a running total of $num? For example, in this case the running total of $num would be 200.
In my real world problem $x is pulled from a db query, so $x will be a different number each time it loops.
thanks for any direction you can offer.
JeNNiDeS :p