Page 1 of 1

Output html string in browser without rendering

Posted: Thu May 03, 2007 11:53 am
by SmokyBarnable
Is there a way to output a string that contains html to the browser just so it shows the html code, for testing purposes, and doesn't actually render.

Posted: Thu May 03, 2007 11:54 am
by John Cartwright

Posted: Thu May 03, 2007 11:55 am
by Oren
htmlspecialchars()?

Edit: Don't use htmlentities(), use htmlspecialchars() instead. Why? http://www.phpwact.org/php/i18n/utf-8

Posted: Thu May 03, 2007 12:20 pm
by John Cartwright
should note the problems of htmlentities() which you've addressed only is for php4