remove html tags from a string except p in php code example
Example: remove html tags from a string except p in php
$text = 'Clean text
Bold text
';
$cleanText = strip_tags($text, ['p','b','i','br']);
$text = 'Clean text
Bold text
';
$cleanText = strip_tags($text, ['p','b','i','br']);