PHP Classes

Adding up variable values

Recommend this page to a friend!

      Top level forums  >  PHP Specialists  >  General  >  Adding up variable values  
Subject:Adding up variable values
Summary:Adding up variable values
Messages:2
Author:Jean-Pierre
Date:2010-07-21 13:14:48
Update:2010-07-26 04:12:12
 

  1. Adding up variable values   Reply   Report abuse  
Picture of Jean-Pierre Jean-Pierre - 2010-07-21 15:46:27
Hi everyone

Think this might be stupid but it's had me going for the better part of today. I have a form that gets info from a db then populates the relevant fields, however the form gets generated as many times as there are records in the db. My question is this, I have a variable called $total that needs to be added up. When the form generates 6 times I then have 6 $total variables. How do I get those 6 $total's to give me a grand total?

I would really appreciate any help you can give me.

Thanks

There is 1 reply in this thread, which is not being displayed.
Browsing this forum thread replies is available only to premium subscribers.


Go to the premium subscriptions page to learn how to become a premium subscriber and have full access to this forum.