Page 1 of 1

PHP + keep html code as code. [updated]

Posted: Fri Jan 12, 2007 6:19 am
by thiscatis
Hi,

I'm having a problem making an install script.
At a certain moment the user has to choose a currency. I'm using £; € etc.. as a value
in the drop down box for the user. But on the install page that code is already parsed as a symbol. (as a value).
And so if they run the install script the value for the currency setting would be a symbol instead of that html code.
Is there any way to keep it as a code, so the settings value after installation would also be £, etc..

Posted: Fri Jan 12, 2007 6:25 am
by neophyte
htmlentities();

Posted: Fri Jan 12, 2007 10:47 am
by thiscatis
In the same system i'm encountering a second problem.
I'd like the prices always with 2 numbers after the point, komma, whichever.
If the total is like £1.5159 (shipping costs etc.) i'm using

Code: Select all

round($p->price, 2)
to round it.
But if the total is £1 it doesn't give 1.00

anyone?

Posted: Fri Jan 12, 2007 10:48 am
by feyd