Sanitize a string


SUBMITTED BY: henry1874w

DATE: June 21, 2017, 11:43 p.m.

FORMAT: Text only

SIZE: 165 Bytes

HITS: 224

  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4. <?php
  5. $str = "<h1>Hello World!</h1>";
  6. $newstr = filter_var($str, FILTER_SANITIZE_STRING);
  7. echo $newstr;
  8. ?>
  9. </body>
  10. </html>

comments powered by Disqus