how to remove html tags from string in php?

Today, We want to share with you how to remove html tags from string in php?.In this post we will show you php remove html entities, hear for php remove html tags keep content we will give you demo and example for implement.In this post, we will learn about Delete Html tags from string PHP with an example.

Removing HTML from a string

Example 1: PHP strip_tags() Function




Pakainfo!");
?>



Example 2:

Welcome!";
    $a = strip_tags($str_data);
    $b = strip_tags($str_data, "");
?>

PHP Code

$str = '

Tamil Rockers.

Love Website'; echo strip_tags($str); //output Tamil Rockers. Love Website

I hope you get an idea about how to remove html tags from string in codeigniter.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment