Page 1 of 1

HTML Entities?

Posted: Tue Sep 13, 2005 3:50 pm
by ianhull
Hi Guys,

another little probelm here.

I have this in my database

My+%3CFONT+face%3D%22Arial+Black%22%3E%3CEM%3ETest%3C%2FEM%3E%3C%2FFONT%3E

When I retrieve it I need it to show it like it would be in say Word.

I have read something about html entities but what I tried does not work

I am using this

<?php echo $cpro ?> // which prints the html above.

Anyone know how to get it ot display with the font size etc?

thanks

Posted: Tue Sep 13, 2005 3:59 pm
by pickle
You're wanting html_entity_decode()

Posted: Tue Sep 13, 2005 4:01 pm
by Ambush Commander
This is a url encoded string, not html entities.

Use urldecode() http://us2.php.net/manual/en/function.urldecode.php

Posted: Tue Sep 13, 2005 4:03 pm
by pickle
Touché ;)

Posted: Tue Sep 13, 2005 4:17 pm
by ianhull
Thanks Guys,

urlencode($var); works great.

Much appreciated.