I have a set rental amount with some variable making an equation. The final variable is the TOTAL of all the equations, i need the total of this variable
[php]<?php //option 1 52 weeks
$weeklyToStudent = $row_rsTenProp[‘rental_price’];
$fourWeeksSecurityDep = 4 * $weeklyToStudent;
$fivetwoWeeksPayable = $weeklyToStudent * 52;
$fee = 184.80;
$resFee = 250;
$fivetwoPayIncFeedSecDep = $fourWeeksSecurityDep + $fivetwoWeeksPayable + $fee;
$initPay15Wks = $weeklyToStudent*15;
$initPay15WksFeeSecDep = $initPay15Wks + $fee + $fourWeeksSecurityDep;
$balanceB4MovingIn = $initPay15WksFeeSecDep - $resFee;
$second14Wks = $weeklyToStudent * 14;
$third14Wks = $weeklyToStudent * 14;
$fourth9Wks = $weeklyToStudent * 9;
$totalPayment = $initPay15WksFeeSecDep + $second14Wks + $third14Wks + $fourth9Wks;
?>
<?php do { ?>
<td class="table-text"><?php echo DoFormatCurrency($totalPayment, 2, ',', '.', '£ '); ?></td>
<td> </td>
<td> </td>
</tr>
<?php
} while ($row_rsTenProp = mysql_fetch_assoc($rsTenProp)); ?>[/php]
i need to multiple the $totalPayment to get the TOTAL of this variable
[php]<?php
$totalPaymentTot = 0;
while
($totalPaymentTot = ($totalPayment));
$totalPayment += $totalPayment;{
$row_totalPayment;
}
echo $totalPaymentTot;?>[/php]