The strip_tags() function strips a string from HTML, XML, and PHP tags.
string strip_tags ( string $str [, string $allowable_tags ] )
This function tries to return a string with all NULL bytes, HTML and PHP tags stripped from a given str. It uses the same tag stripping state machine as the fgetss() function.
Parameter | Description |
---|---|
str | Required. Specifies the string to check |
allowable_tags | You can use the optional second parameter to specify tags which should not be stripped. |
Returns the stripped string.