It's fairly straightfoward as far as functions go. You can't use round() because that keeps the result as a number (thus losing any insignificant zeroes); [s]printf() is another option but probably not as good as number_format().