$val = number_format($row['val'],2);
Bastien
From: Mark Bomgardner <mbomgardner@xxxxxxxxx>
Reply-To: mbomgardner@xxxxxxxxx
To: Php-Db <php-db@xxxxxxxxxxxxx>
Subject: Converting to Decimal
Date: Wed, 28 Jun 2006 17:20:21 -0500
I am query a database and pulling some decimal values out of the table, but
when I display whole numbers in php, it drops the decimal places.
It takes a value of 12.00 in the database and makes it 12, where I need
12.00. I am having trouble finding ways to "cast" this value.
markb
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php