use htmlspecialchars() to convert the HTML characters in to non-executable code.
e.g. if
$string = \'<BR>hello<BR>\';
$string = htmlspecialchars($string);
that will convert the html characters to non-html executable codes, so that you can view them as they are in browser.