Howto Javascript Php Reverse Htmlentities
- Forums
- PHP
- Howto Javascript Php Reverse Htmlentities
This Page Contains information about Howto Javascript Php Reverse Htmlentities By wallpaperama in category PHP with 0 Replies. [1204], Last Updated: Sat May 18, 2024
wallpaperama
Mon Nov 10, 2008
0 Comments
975 Visits
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