|
|
strip_tags Function in PHP
|
Tutorials » Php »
|
Topic |
What is strip_tags Function?
|
|
Explanation |
|
The "strip_tags" function is used to strip HTML and PHP tags from a string.
Syntax:
strip_tags(string,allow)
In the above syntax "string" with HTML,PHP tags from which to strip strings, "allow" specifies the
allowable tags that need not be stripped.
Example:
<?php
echo strip_tags("Hi <b><i>Folks!</i></b>","<b>");
?>
Result:
Hi Folks!
In the above example the "<b>" is given as the allowable tag, where as "<i>""</i>" tags are stripped.
|
|
A Note |
Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial.
Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.
|
|
|
|