Money_Format Error with Calculated Variable
I'm trying to calculate a value then display as currency but when I
send my variable to format it says "expecitng double, sent string" how
can I do this
<?php
$total = $row_Totals['InvTotals'];
$payments = 0;
if ($row_Payments) $payments = $row_Payments['tPayments'];
$total = $total - $payments;
echo money_format('%i', (int)$total . "\n"); ?>
|