simple summation problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jolan_lars
Forum Newbie
Posts: 19
Joined: Thu Oct 23, 2003 12:15 pm

simple summation problem

Post by jolan_lars »

hi all, i need help on this:

I have a loop:

while (condition)
{
***** //other stuffs in here
$variable= ****; //some formulas in here
}

Everytime the loop runs, $variable produces different values. After the loop finishes, I need the summation of all the different values produced.

Help. :cry:

Jolan
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

$variable += ****; //some formulas in here
jolan_lars
Forum Newbie
Posts: 19
Joined: Thu Oct 23, 2003 12:15 pm

Post by jolan_lars »

awesome! Thanks a lot.

Jolan
Post Reply