DBookatay Posted September 12, 2007 Share Posted September 12, 2007 When I use the following: setlocale(LC_MONETARY, 'en_US'); $balance = money_format('%(#10n', $row['balance']); $down = money_format('%(#10n', $row['down']); I get this error: Warning: money_format() expects parameter 2 to be double, string given in /home/.phillipina/dbookatay/login.carcityofdanbury.com/passed/New/list.php on line 329 Link to comment https://forums.phpfreaks.com/topic/69055-solved-help-with-money_format/ Share on other sites More sharing options...
DBookatay Posted September 12, 2007 Author Share Posted September 12, 2007 Solved it myself... (Don't know if this is the correct way, but it works.) setlocale(LC_MONETARY, 'en_US'); if ($row['balance']) {$balance = money_format('%(#10n', $row['balance']);} else {$balance = '';} if ($row['down']) {$down = money_format('%(#10n', $row['down']);} else {$down = '';} Link to comment https://forums.phpfreaks.com/topic/69055-solved-help-with-money_format/#findComment-347104 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.