The filter_var() function with the FILTER_SANITIZE_STRING filter is used to sanitize a string in PHP.

  • TRUE
  • FALSE
To sanitize a string in PHP, you can use the filter_var() function with the FILTER_SANITIZE_STRING filter. This filter specifically sanitizes the string by removing HTML tags and encoding special characters, making the string safe for output. The filter_var() function provides a convenient and reliable way to sanitize strings in PHP. For more information, see: http://php.net/manual/en/function.filter-var.php
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *