To sanitize a string in PHP, you can use the filter_var() function with the FILTER_SANITIZE_STRING ______.
- filter
- sanitize
- validate
- clean
To sanitize a string in PHP, you can use the filter_var() function with the FILTER_SANITIZE_STRING flag. This flag specifically sanitizes the string by removing HTML tags and encoding special characters to make the string safe for output. The filter_var() function provides an easy and efficient way to sanitize strings in PHP. For more details, see: http://php.net/manual/en/function.filter-var.php
Loading...
Related Quiz
- You need to get the error message of the last JSON operation in your PHP script. How would you do this?
- In PHP, variable names can start with a number.
- How can you set a cookie in PHP?
- An instance of an abstract class can be created in PHP.
- You are writing a PHP script and you need to store a collection of items that can be accessed by a unique key for each item. How would you do this using an associative array?