Gary wrote:
I cant seem to get this to work for me. I want the number to be formated to money (us, 2 decimal points).
/**
* returns 4.3 as $4.30 (formats us dollars)
*
* @param $amount
* @return string
*/
function us_dollar_format( $amount )
{
return ( '$' . number_format($amount, 2, '.', '') );
}
echo us_dollar_format(4.3);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

