- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
FILTER_SANITIZE_STRIPPED constant in PHP
The FILTER_SANITIZE_STRIPPED constant encodes or strips unwanted characters.
Options and Flags
FILTER_FLAG_NO_ENCODE_QUOTES − This flag does not encode quotes
FILTER_FLAG_STRIP_LOW − Strips characters with ASCII value below 32
FILTER_FLAG_STRIP_HIGH − Strips characters with ASCII value above 32
FILTER_FLAG_ENCODE_LOW − Encodes characters with ASCII value below 32
FILTER_FLAG_ENCODE_HIGH − Encodes characters with ASCII value above 32
FILTER_FLAG_ENCODE_AMP − Encodes the & character to &
Return
The FILTER_SANITIZE_STRIPPED constant does not return anything.
Example
<?php $var = "<p><strong>Demo!</strong>text!<p>"; var_dump(filter_var($var, FILTER_SANITIZE_STRIPPED)); ?>
Output
The following is the output.
string(10) "Demo!text!"
Advertisements