Removes all html tags
<?php
strip_tags(string $value, [ bool $addspace = true ])
Example #1
{strip_tags "foo<strong>bold</strong>bar"}
{strip_tags "foo<strong>bold</strong>bar" false}
{strip_tags "<i>foo</i> <strong>bold</strong>bar" false "<strong>"}
The above example will output:
foo bold bar
fooboldbar
foo<strong>bold</strong>bar
Version | Description |
---|---|
1.3.3 | Added the allowed_tags parameter. |