note 70413 deleted from function.htmlentities by nlopess

From: Date: Sat, 30 Dec 2006 18:49:34 +0000
Subject: note 70413 deleted from function.htmlentities by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-121114@lists.php.net to get a copy of this message
Note Submitter: kevin at metalaxe dot com ---- for danster3k at hotmail dot com, this will replace the ampersand returned for your &pound; with &amp;pound; and display the entity int he browser: <?php if (isset($_POST['action']) && $_POST['action'] == 'submitted') { $output =($_POST['myInput']); print str_replace( '&', '&amp;', 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 } ?>

« previous php.notes (#121114) next »