View Single Post

  #1 (permalink)  
Old 02-10-2006
bdog4@hotmail.com
 
Posts: n/a
Default 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"); ?>

Reply With Quote