← All built-ins / strip_tags()
strip_tags()
strip_tags(...$args): string
Parameters
| Name | Type | Description |
|---|---|---|
| $s | string | HTML string |
| $allowed | string | tags to keep, e.g. "<b><i>"optional |
Return value
The text without HTML tags.
Example
echo strip_tags("<p>holy <b>php</b></p>");holy php