Hey all, this one should be easy 🙂
I'm using that nifty fgetcsv() function to play with a csv file, and it's working nicely.
Here's the problem: When you export from excel or staroffice a spreadsheet with numbers for currency (ie $6.50) it of course gets dumped as "6.5". Some of the numbers are like "6.25" so they already have the right number of decimal places.
I am displaying these numbers in a table (which I can do easily) but I want to make sure they all have zeros stuck on the ends if necessary so that they all end in two decimal places. That's the tricky part. What's the best way to do that?
Thanks,
Tom