Answers for "php remove all html code from string"

PHP
1

remove all html codes using php

<?php
  // Remove all html codes from a string
  	$html = '<p>I love <em>codes</em>.<br>We shall keep the learning going</p>';
	echo strip_tags($html);
	echo '<br>';
	// Remove specific html tag/s from a string
	echo strip_tags($html, '<br>');
?>
Posted by: Guest on August-20-2021
2

remove html from string php

echo strip_tags("Hello <b>world!</b>");
Posted by: Guest on May-18-2020

Code answers related to "php remove all html code from string"

Browse Popular Code Answers by Language