RE: [PHP] Limiting number of decimal places reported

From: Date: Sun, 30 Jun 2002 05:25:51 +0000
Subject: RE: [PHP] Limiting number of decimal places reported
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-104549@lists.php.net to get a copy of this message
John, Try using the number_format function. Bev -----Original Message----- From: John Wulff [mailto:johnw@orcasnet.com] Sent: Saturday, June 29, 2002 3:10 PM To: php-general@lists.php.net Subject: [PHP] Limiting number of decimal places reported How do I limit the number of decimal places returned in this query? <?php $result2 = mysql_query("SELECT sum(purchase_price) as total FROM assets where order_number='$order_number'"); while(list($order_total) = mysql_fetch_row($result2)) { print ("$order_total"); } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#104549) next »