[Solved] Prevent tags being used in


You Can Use The htmlentities

<?php

  $comments = "A 'quote' is &lt;b&gt;bold&lt;/b&gt;"; 
  echo "<textarea>".htmlentities($comments )."</textarea>";

 ?>

DEMO:: http://phpfiddle.org/main/code/n0sf-b7ka

You Can Also Do This.

  if (isset($_POST["submit"]) && !empty($_POST["comments"])) {

       $comments = $_POST["comments"];

      echo "<textarea>".htmlentities( $comments )."</textarea>";

  }

solved Prevent tags being used in