Dustin Wish wrote:
I have a number like -56.98
I need to convert it to -5698. I tried
?php
$num = -56.98;
$conv = $num * 100; /** -5698 */
?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Like the other guy said or take a look at the sprintf() function.
On Thu, 20 Dec 2001, phantom wrote:
I would like to format numbers to be a fixed width.
I want all numbers to be 2 characters in width to the left of the
decimal point.
1 should be 01
2 should be 02
3 should be 03
How
2 matches
Mail list logo