{"id":213,"date":"2013-10-24T06:54:01","date_gmt":"2013-10-24T06:54:01","guid":{"rendered":"http:\/\/www.advancedwebhelp.com\/blog\/?p=213"},"modified":"2013-11-02T05:21:33","modified_gmt":"2013-11-02T05:21:33","slug":"warning-money_format-does-not-work-on-windows","status":"publish","type":"post","link":"https:\/\/www.advancedwebhelp.com\/blog\/2013\/warning-money_format-does-not-work-on-windows","title":{"rendered":"Warning: money_format does not work on Windows"},"content":{"rendered":"<p>Folks,<\/p>\n<p><a href=\"http:\/\/www.advancedwebhelp.com\/blog\/wp-content\/uploads\/2013\/11\/php-logo-s.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-326 alignright\" style=\"margin-top: -30px;\" alt=\"PHP logo\" src=\"http:\/\/www.advancedwebhelp.com\/blog\/wp-content\/uploads\/2013\/11\/php-logo-s.png\" width=\"208\" height=\"208\" srcset=\"https:\/\/www.advancedwebhelp.com\/blog\/wp-content\/uploads\/2013\/11\/php-logo-s.png 208w, https:\/\/www.advancedwebhelp.com\/blog\/wp-content\/uploads\/2013\/11\/php-logo-s-150x150.png 150w, https:\/\/www.advancedwebhelp.com\/blog\/wp-content\/uploads\/2013\/11\/php-logo-s-148x148.png 148w, https:\/\/www.advancedwebhelp.com\/blog\/wp-content\/uploads\/2013\/11\/php-logo-s-31x31.png 31w, https:\/\/www.advancedwebhelp.com\/blog\/wp-content\/uploads\/2013\/11\/php-logo-s-38x38.png 38w\" sizes=\"auto, (max-width: 208px) 100vw, 208px\" \/><\/a>I am certain you are far cleverer than I. I spent a couple of hours attempting to do some development with PHP function money_format(), and it did not work.<\/p>\n<p>I wanted to use money_format() to convert a number formatted for currency. But, I wanted it function for development and for site.<\/p>\n<p>I scratched my head over and over &#8230; leaving dandruff everywhere. After some reflection, and then search of the internet and reading the PHP documentation for money_format over and over &#8230; it dawned on me that the documentation said it does not work on a Windows system. I develop on a Windows system running Apache, and load to a server running Linux. Don&#8217;t use money_format if you develop on Windows &#8230; if you want to see function on your development environment.<\/p>\n<p style=\"margin-bottom: 30px;\"><span style=\"font-size: 22px;\">Use <strong>number_format()<\/strong><\/span>, this works on both Windows and Linux. Much better.<\/p>\n<p>Oh, and the currency symbol can be identified using localconv(), which returns an array with [currency_symbol].<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Folks, I am certain you are far cleverer than I. I spent a couple of hours attempting to do some development with PHP function money_format(), and it did not work. I wanted to use money_format() to convert a number formatted for currency. But, I wanted it function for development and for site. I scratched my [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-213","post","type-post","status-publish","format-standard","hentry","category-php"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.advancedwebhelp.com\/blog\/wp-json\/wp\/v2\/posts\/213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.advancedwebhelp.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.advancedwebhelp.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.advancedwebhelp.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.advancedwebhelp.com\/blog\/wp-json\/wp\/v2\/comments?post=213"}],"version-history":[{"count":2,"href":"https:\/\/www.advancedwebhelp.com\/blog\/wp-json\/wp\/v2\/posts\/213\/revisions"}],"predecessor-version":[{"id":350,"href":"https:\/\/www.advancedwebhelp.com\/blog\/wp-json\/wp\/v2\/posts\/213\/revisions\/350"}],"wp:attachment":[{"href":"https:\/\/www.advancedwebhelp.com\/blog\/wp-json\/wp\/v2\/media?parent=213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.advancedwebhelp.com\/blog\/wp-json\/wp\/v2\/categories?post=213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.advancedwebhelp.com\/blog\/wp-json\/wp\/v2\/tags?post=213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}