<div id="userpost">
<?php echo $txt; ?>
</div>
<?php $txt="yeah yeah"; ?>
I want the echo on the div to be the normal text but if you look at the source it would be something like this
Yea
Hope this would help you
<?php
$new = htmlspecialchars("<a href='test'>Test</a>", ENT_QUOTES);
echo $new;
?>
for detail
htmlentities($txt);maybe ?