note 45988 added to function.htmlspecialchars

From: Date: Sat, 25 Sep 2004 16:57:15 +0000
Subject: note 45988 added to function.htmlspecialchars
Groups: php.notes 
Request: Send a blank email to php-notes+get-77310@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+45988 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45988&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45988&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#77310) next »