AW: [PHP3] formatting a double From: Steven Glogger (list <email protected>)
Date: 04/30/00

number_format($var,2);

but see the function: number_format

greetings

steven

-----Ursprungliche Nachricht-----
Von: Gurkan Nisanci [mailto:nisanci <email protected>]
Gesendet: Sonntag, 30. April 2000 21:15
An: php3 <email protected>
Betreff: [PHP3] formatting a double

I have a variable num1 and its value is 3,666666667.
But I want to print it as 3,66 not 3,666666667.
So how must I write the echo statement to format the double number?

--
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest, e-mail: php3-digest-subscribe <email protected>
To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-admin <email protected>

-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>