html_entity_decode()


ok, today i was writing my wallpaper script and in my php script i had to change my code into html code and to do that i used htmlentities() function, so to make it go back to the original code i had to use html_entity_decode()

for example. lets say i have this this string:

$string = "Free Wallpapers at Wallpaperama.com";
HTML CODE: '"Free Wallpapers at Wallpaperama.com";'
OUTUP: "Free Wallpapers at Wallpaperama.com";

now when i change it to with htmlentities it looks like this:

$string = htmlentities('"Free Wallpapers at Wallpaperama.com"');
HTML CODE: "Free Wallpapers at Wallpaperama.com";
OUTUP: "Free Wallpapers at Wallpaperama.com";

so to change it back you can use

$string = html_entity_decode($string);

hope this helps