Nuno Pereira wrote:
To do date change the first line from
printf(" number_format({$thearray[cost]}, 2)
to
printf(" ".number_format({$thearray[cost]}, 2)."
I think you mean:
print( "" . number_format( $thearray['cost'], 2 ) . "" );
As stated by a previous poster to this thread, you should
Bill Whitacre wrote:
I can get this to work just fine:
Comes out $23,999.39
I'd like use the number_format() thingie on an array returned from a
mysql_query.
My current program snippet looks like:
$res = mysql_query("SELECT org, COUNT(*), SUM(annual_cost) AS
cost FROM a05
Bill Whitacre wrote:
printf(" {$thearray[org]}
{$thearray["COUNT(*)"]}
$ {$thearray[cost]} ");
If I replace
{$thearray[cost]}
with
number_format({$thearray[cost]}, 2)
Although this is a MySQL mailing list and your problem is not MySQL
related, but a PHP question I'
I can get this to work just fine:
Comes out $23,999.39
I'd like use the number_format() thingie on an array returned from a
mysql_query.
My current program snippet looks like:
$res = mysql_query("SELECT org, COUNT(*), SUM(annual_cost) AS
cost FROM a05
GROUP BY org ORDER BY