Page 1 of 1

How do I make amounts, correct for Euros?

Posted: Wed Mar 12, 2014 9:58 am
by simonmlewis

Code: Select all

printf ("%.2f", $row->price);
echo "€";
I need this to show like this: 30,95€.
How do I make the decimal, show as a comma?

I did try:

Code: Select all

printf ("%,2f", $row->price);
echo "€";
Bit that just puts an F on the screen.

Re: How do I make amounts, correct for Euros?

Posted: Wed Mar 12, 2014 10:10 am
by Celauran

Code: Select all

echo number_format($row->price, 2, ',', ' ');