Forum Moderators: coopster
I was curious on how to see if a variable has 2 decimal points and then if it doesn't convert it to a decimal value.
For example, if I have a value that is 5700, I need to convert it to 5700.00.
Thanks for your help :)
Wes
I looked up that function and found that sprintf would work great.
I then did this:
$total = sprintf("%01.2f",$total);
It works great and converts it to the format I need.
Thanks again :)