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
Loading...
Related Quiz
- What PHP function can be used to format a date?
- PHP code is enclosed in ______ and ______ tags.
- How can we display information of a variable and readable by a human with PHP?
- What is the purpose of the assignment operators in PHP?
- Which of the following actions are commonly performed on files in PHP?