Search
 
SCRIPT & CODE EXAMPLE
 

PHP

hmtl dellete tag php

<?php
function strip_tags_content($text, $tags = '', $invert = FALSE) {

  preg_match_all('/<(.+?)[s]*/?[s]*>/si', trim($tags), $tags);
  $tags = array_unique($tags[1]);
   
  if(is_array($tags) AND count($tags) > 0) {
    if($invert == FALSE) {
      return preg_replace('@<(?!(?:'. implode('|', $tags) .'))(w+).*?>.*?</1>@si', '', $text);
    }
    else {
      return preg_replace('@<('. implode('|', $tags) .').*?>.*?</1>@si', '', $text);
    }
  }
  elseif($invert == FALSE) {
    return preg_replace('@<(w+).*?>.*?</1>@si', '', $text);
  }
  return $text;
}
?>
Comment

PREVIOUS NEXT
Code Example
Php :: how to use postgresql with laravel 
Php :: remove last all special character from string php 
Php :: symfony redirect to previous page 
Php :: select query in php 
Php :: php remove anchor tag from string 
Php :: @include laravel 
Php :: model json laravel accessor to convert to array 
Php :: php eliminar elementos vacios array 
Php :: Convert String to Date and Date-Time in PHP 
Php :: show random post in laravel 
Php :: update query in codeigniter using where condition 
Php :: round up built in function php 
Php :: php short string 
Php :: laravel try catch example 
Php :: substract 2 dates php 
Php :: how to get a whole number from decimal in php 
Php :: wordpress register post type 
Php :: date diff php 
Php :: how get the Photo size upload in laravel 
Php :: menampilkan hari dan tanggal sekarang di php 
Php :: installing bootstrap ui in laravel app 
Php :: how to remove null values in array php 
Php :: laravel run schedule locally 
Php :: for each php 
Php :: How to use my constants in Larvel 
Php :: number_format reverse php 
Php :: convert date to timestamp in laravel builder 
Php :: migrate specific migration file laravel 
Php :: the_post_thumbnail 
Php :: array flat php 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =