Code: Select all
number_format($var,2)
the number represents how many decimal places you want.
_____________________________
Question #2
Code: Select all
echo "€/$".(substr($myrow["price"],1)*1.6)
Question #3
Code: Select all
$conversion = 1.6;
echo "€/$".(substr($myrow["price"],1)*$conversion);
you can then change $conversion at anytime. This way in 6 months you won't forget what the 1.6 was.
make sure you have any math function encapsulated with () if it is in the same line as your output.
BTW why are you calling a substr() function on the price? I would not reccomend including the "€/$" in the within the database.