Getting the sum of amounts in php - please assist

I want to add the totals of my records posted to a mysql database table. I can achieve this by using the += method, but I have to have it in a repeated region (dreamweaver). I know there is certainly a shorter method, please, anyone,, assist me in this.