note 45988 deleted from function.htmlspecialchars by betz

From: Date: Sat, 25 Sep 2004 17:21:34 +0000
Subject: note 45988 deleted from function.htmlspecialchars by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-77312@lists.php.net to get a copy of this message
Note Submitter: ---- To reverse the action of htmlspecialchars(), use this code: <?php unhtmlspecialchars( $string ) { $string = str_replace ( '&amp;', '&', $string ); $string = str_replace ( '&#039;', '\'', $string ); $string = str_replace ( '&quot;', '\"', $string ); $string = str_replace ( '&lt;', '<', $string ); $string = str_replace ( '&gt;', '>', $string ); return $string; } ?>

« previous php.notes (#77312) next »