PDA

View Full Version : Html decode



dardanel
10-18-2006, 09:03 PM
I have the folowing special character(& #259; & nbsp; & #351; ) into a database. Can someone please tell me how can i make them been interpreted, i mean how can i see what are the character for that special code.

AbelaJohnB
10-18-2006, 10:17 PM
Did you try html_entity_decode() (http://php.net/html-entity-decode/) ??

example:


$foobar = "& #259; & nbsp; & #351;"; (without spaces)
print html_entity_decode($foobar);


& nbsp; will be not show as that is the code for a [space] (ref: http://www.lookuptables.com/)

dardanel
10-19-2006, 07:44 AM
Thanks! ...for that answer ...i try that and it workt.;)

codeexploiter
10-19-2006, 08:06 AM
Hi

I am extremely sorry for my earlier post, which was misleading. The code posted by AbelaJohnB works perfectly.

Sorry once more about the confusing act from my side.