PHP removing html tags from string
html, php
Solution
Try to put it like that
$content = strip_tags($text);
Or you can do it with regular expression like that:
$content = preg_replace('/<[^>]*>/', '', $text);
By this `$content = strip_tags($text, '<p>');` you are allowing the `<p>` tag in the string.
For more info see the link http://php.net/manual/en/function.strip-tags.php
Problem
I have string: ``` <p justify;"="">Verslo centrai Lietuvos nekilnojamojo turto plėtros asociacijos konkurse ...</p> ``` and want want remove tag ``` <p justify;"=""></p> ``` my code: ``` $content = strip_tags($text, '<p>'); ``` but i get empty string: `string(0) ""` , what I do wrong ?