Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

remove html tags from a string except p in php

$text = '<div class="test"><p>Clean <a href="#">text</a><br><b>Bold</b> text</p></div>';

$cleanText = strip_tags($text, ['p','b','i','br']);
Source by phpf1.com #
 
PREVIOUS NEXT
Tagged: #remove #html #tags #string #php
ADD COMMENT
Topic
Name
6+3 =