note 70413 added to function.htmlentities
| From: | kevin at metalaxe dot com | Date: | Sun, 15 Oct 2006 21:39:18 +0000 |
| Subject: | note 70413 added to function.htmlentities | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-118554@lists.php.net to get a copy of this message | ||
for danster3k at hotmail dot com, this will replace the ampersand returned for your £ with
£ and display the entity int he browser:
<?php
if (isset($_POST['action']) && $_POST['action'] ==
'submitted') {
$output =($_POST['myInput']);
print str_replace( '&', '&', htmlentities($output,ENT_QUOTES) );
}
else {
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>"
method="post">
<p>Enter e-mail Subject here: <input type="string"
name="myInput"> <input type="submit" name="submit"
value="Convert"></p>
<input type="hidden" name="action" value="submitted" />
</form>
<?php
}
?>
----
Server IP: 216.194.113.175
Probable Submitter: 71.231.101.38
----
Manual Page -- http://www.php.net/manual/en/function.htmlentities.php
Edit -- https://master.php.net/note/edit/70413
Del: integrated -- https://master.php.net/note/delete/70413/integrated
Del: useless -- https://master.php.net/note/delete/70413/useless
Del: bad code -- https://master.php.net/note/delete/70413/bad+code
Del: spam -- https://master.php.net/note/delete/70413/spam
Del: non-english -- https://master.php.net/note/delete/70413/non-english
Del: in docs -- https://master.php.net/note/delete/70413/in+docs
Del: other reasons-- https://master.php.net/note/delete/70413
Reject -- https://master.php.net/note/reject/70413
Search -- https://master.php.net/manage/user-notes.php