PHP Code Function to Convert HTML Enties Back to Characters
PHP Simple Function to Convert Strings that Have Been Security Cleaned via stripslashes(), strip_tags(), htmlentities(), etc Back to Regular Characters in PHP
Home
Short:
/* ---------------------------------------------- function to convert security cleaned string ie stripslashes(), strip_tags(), htmlentities() back to their proper characters ----------------------------------------------- */ function decodeString($str) { // Decode &, <, > and " $str = htmlspecialchars_decode($str); // Decode &, <, >, " and ' $str = htmlspecialchars_decode($str, ENT_QUOTES); return $str; }
source code home
S
H
A
R
E
Facebook
Twitter
LinkdIn
Reddit
Blogger
π Ώing
Email π§
π Multiple
Facebook
Twitter
Linkdin
Reddit
Blogger
Ping
Email
Share β