According to my books.. if you put a number in your format it makes the result that many characters as a minimum. When dealing with floating point numbers, does the decimal count as one of those characters?
Example:
$number = sprintf("%05.1f", 0)
This results in 000.0
Technically it's 5 characters, but when dealing with numbers, i've never heard of the decimal counting in the minimum field width.
In order to get this: 0000.0
my code would have to be
$number = sprintf("%06.1f", 0)
Correct?
B Stopp
Example:
$number = sprintf("%05.1f", 0)
This results in 000.0
Technically it's 5 characters, but when dealing with numbers, i've never heard of the decimal counting in the minimum field width.
In order to get this: 0000.0
my code would have to be
$number = sprintf("%06.1f", 0)
Correct?
B Stopp