Jump to content

Fatal error: Call to undefined function money_format()


niche

Recommended Posts

Can't get this to work. It's a copy/paste from http://www.w3schools.com/PHP/func_string_money_format.asp. Nothing like this has ever happened on this system before.

<?php$number = -1234.5672;echo money_format("%=*(#10.2n", $number);?>

Link to comment
Share on other sites

did you read up on it on the php manual? http://us3.php.net/manual/en/function.money-format.phpdoes this apply to you?

Note:The function money_format() is only defined if the system has strfmon capabilities. For example, Windows does not, so money_format() is undefined in Windows.
Link to comment
Share on other sites

I went to the manual, after failing at w3schools, looking for tips for making it work not for reasons it won't work. Guess I found what I wanted not what I needed. Turns out "$". $amt was much simpler. Thanks to ShadowMage, thescientist, and justsomeguy for their help.Niche

Link to comment
Share on other sites

money_format() is localised, though, which is probably its main advantage (along with the pretty formatting).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...