Search
 
SCRIPT & CODE EXAMPLE
 

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']);
Comment

PREVIOUS NEXT
Code Example
Php :: laravel redirect back 
Php :: smarty shorthand assign var 
Php :: laravel test specific class 
Php :: laravel request validation boolean 
Php :: check is domain php 
Php :: php artisan serve a folder 
Php :: how to debug php 
Php :: How to use php to set title 
Php :: get the href in string regex php 
Php :: yii2 confirm 
Php :: wordpress my account url 
Php :: switch php version 
Php :: how to take last entry in database in laravel Method Three 
Php :: 419 page expired in laravel 
Php :: add like and equal in same query in laravel 
Php :: php reporting wrong time 
Php :: MForm Attribute für Felder 
Php :: if online php 
Php :: laravel go back to previous page blade 
Php :: wp override home url with php 
Php :: acf repeater example count 
Php :: laravel remove public from url 
Php :: a backwards counting forloop 
Php :: check php version mac 
Php :: disable SSL check in PHP cURL 
Php :: php run python script 
Php :: wpml display language switcher 
Php :: laravel make model and migration 
Php :: how to print all session variables in php 
Php :: join 2 tables laravel 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =