Answers for "remove all html codes using php"

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

Browse Popular Code Answers by Language