$price = number_format( (int) $price, 2, '.', '');

Ed Curtis wrote:
I'm using an example straight from the manual on the php site that
doesn't seem to work.

$price = "1234.567890";

$price = number_format($price, 2, '.', '');

echo $price;

Returns 1234.567890

Should return 1234.57 correct?

Thanks,

Ed

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to