multiple a single variable
i have set rental amount variable making equation. final variable total of equations, need total of variable
| <?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 { ?>
<tr>
<td class="table-text"><a href="customer-info.php?recordid=<?php echo $row_rstenprop['userid']; ?>"><?php echo $row_rstenprop['userid']; ?></a></td>
<td class="table-text"><?php echo $row_rstenprop['weeks'] / 7; ?> weeks</td>
<td class="table-text"><?php echo $row_rstenprop['payment_option']; ?></td>
<td class="table-text"><?php echo $row_rstenprop['rental_price']; ?></td>
<td class="table-text"><?php echo $row_rstenprop['prop_id']; ?></td>
<td class="table-text"><?php echo doformatcurrency($totalpayment, 2, ',', '.', '£ '); ?></td>
<td> </td>
<td> </td>
</tr>
<?php
} while ($row_rstenprop = mysql_fetch_assoc($rstenprop)); ?>
i need multiple $totalpayment total of variable
i have done
| <?php | ||||
| $utiltotal = 0; | ||||
| $utiltotal =+$totalpayment ; | ||||
| ?> |
<p><?php
echo $utiltotal ?></p>< |
this giving me first total, know need add loop in here somewhere dont know where.
thanks in advance
More discussions in Develop server-side applications in Dreamweaver
adobe
Comments
Post a Comment