Hello all, If I have a variable called $num=22; How can I echo that as a double like 22.00?
I tried the below but no luck.
$num= settype($num,"double"); echo $num;
[man]printf[/man]
Thanks for the help. Came up with this...
echo $num = sprintf("%01.2f", $num);
Let's say I have the sample below, how can I have the commas print $num=11,122.22;
$num=11122.22; echo $num = sprintf("%01.2f", $num);
Figured it alk to you guys later. Tracy