<html>
<body>
// Variable to check
$str = "<h1>Hello World!</h1>";
// Remove HTML tags from string
$newstr = filter_var($str, FILTER_SANITIZE_STRING);
echo $newstr;
</body>
<!-- Mirrored from www.w3schools.com/php/phptryit.asp?filename=tryphp_func_sanitize_string by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 18:10:00 GMT -->
</html>