PHP + keep html code as code. [updated]

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
thiscatis
Forum Contributor
Posts: 434
Joined: Thu Jul 20, 2006 11:00 am

PHP + keep html code as code. [updated]

Post 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..
Last edited by thiscatis on Fri Jan 12, 2007 10:45 am, edited 1 time in total.
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

htmlentities();
thiscatis
Forum Contributor
Posts: 434
Joined: Thu Jul 20, 2006 11:00 am

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Post Reply