On 9 September 2010 14:52, Jack <JackListMail@xxxxxxxxx> wrote: > Hello All, > I have some code which converts to some html to ascii characters. This > basically obfuscates the html code, but shows it correctly on an page. > I am trying to show the results of the obfuscation ( works correctly because > it displays the html value ), but I want to then show the obfuscated html > code so they can copy it. > An example is I want to show them this below: > <a > href="mailto:your > 0;email.addre� > 0115;s?subject=&cc=&bcc=&body=" style="" class="" > id="">your@email� > 46;address</a> > Which was created by the code, but I apparently can't seem to echo it and > get it to display like above.. It converts it to html no matter what I do. > Thanks! > Jack htmlentities() is your friend here. <?php $text = '<a href="mailto:your@email.address?subject=&cc=&bcc=&body=" style="" class="" id="">your@email.address</a>'; echo $text, htmlentities($text); ?> outputs ... your@xxxxxxxxxxxxx<a href="mailto:your@email.address?subject=&cc=&bcc=&body=" style="" class="" id="">your@email.address</a> -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php