September 2001
Intermediate to advanced
768 pages
32h 45m
English
string strip_tags(string string, [string allowable_tags])
Strips angle-bracket delimited text from a string.
Returns:
String
Description:
strip_tags() removes all angle-bracket delimited substrings from a string. This includes HTML, PHP, SGML, XHTML, and XML tags.
A list of optional tag names to ignore can be specified using the optional allowable_tags parameter. The tag names should be enclosed in angle brackets; for example, "<b><i><em><strong><u>".
Version:
PHP 3.0.8, PHP 4.0b2+
Example:
<?php $text = <<<_HTML_ <meta http-equiv="refresh" content="0;URL=http://some.naughty.site.example.com/"> I <b><i>love</i></b> forums that don't filter the HTML tags that they allow ... |
Read now
Unlock full access