money_format for Windows

Hey Guys,

I have a Windows 2008 Server at home that I installed Apache, PHP & MySql on. I got everything working. I moved over some PHP files I have working on my Hostmonster account. All the code works fine on the hostmonster site, but when I move it to the Windows based system I find that my money_format() function does not work. I did some research and found out that its not supported under Windows.. (*&*#$%) I'm looking to make the following code work under Windows, can someone help me with the windows equivalent:

 setlocale(LC_MONETARY, 'en_US'); //Set Currency to US. This will put a $ in front of the   number
$msrp = money_format('%.0n' ,$rows['MSRP']); //This sets the format for the dollar amount to $##,### no cents

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ray PaseurCommented:
You can probably use number_format() and concatenate the string literal '$' (note single quotes) to the front of the value.
Ray PaseurCommented:

<?php // RAY_temp_rraymond1130.php

$var = 1234;
setlocale(LC_MONETARY, 'en_US'); //Set Currency to US. This will put a $ in front of the   number
$msrp = money_format('%.0n' ,$var);

$msrp = '$' . number_format($var,0);

Open in new window

Best of luck with your project, ~Ray

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rraymond1130Author Commented:
You are the man Ray.... Thanks for all your help....
Ray PaseurCommented:
Thanks for the points - it's a great question, ~Ray
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.