note 45989 added to function.htmlspecialchars

From: Date: Sat, 25 Sep 2004 16:58:39 +0000
Subject: note 45989 added to function.htmlspecialchars
Groups: php.notes 
Request: Send a blank email to php-notes+get-77311@lists.php.net to get a copy of this message
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; } ?> ---- Manual Page -- http://www.php.net/manual/en/function.htmlspecialchars.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45989 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45989&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45989&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#77311) next »