how to escape html tags in php

Solutions on MaxInterview for how to escape html tags in php by the best coders in the world

showing results for - "how to escape html tags in php"
Erika
29 Oct 2017
1/*  EXAMPLE:	<p>Bed & Breakfast</p>	-->	  <p>Bed &amp; Breakfast</p>  
2    & 	&amp;
3    " 	&quot; 				(unless ENT_NOQUOTES is set)
4    ' 	&#039; or &apos; 	(ENT_QUOTES must be set)
5    < 	&lt;
6    > 	&gt;				*/
7
8<?php
9$new = htmlspecialchars("<a href='test'>Test</a>", ENT_QUOTES);
10echo $new// <a href='test'>Test</a>
11?>
queries leading to this page
escape character in phpphp escape string for htmlescape special character in string phpphp function special charactersphp escape json special charactershow to escape special characters in phpremove escape characters from string in phpescape html entities phpescape html phpphp html special characterphp escape html codehow to use special characters from string in phpdefine escape character phpphp remove html tagsescape special character phpescape string to html phpphp echo html special charactersadd escape characters to string phpescape chars phpphp special characters in stringescape html tags in phpspecial character phpphp escape charactersescape characters in phpescape character phpphp special charactersspecial characters in phpphp remove escape characters from stringescape special characters in phpremove escape characters from string phpphp escape html tagshow to escape special characters in url phphtml special characters phpescape special characters in json string phpphp escape special characters accentshtml special characters in phphtml escape phphtml special characters 28 29 in phphtml special chars into html phpphp escape special characters in stringhow to handle special characters when display text in page using phphtml special char phpescape characters phphow to escape html tags in phpphp escape special charactersesc special caracter phpphp echo how to escape characterphp best way to escape html and still print htmljson special characters escape phphtml special characters code in phpphp escape htmlhtml special characters php functionhow to escape html tags in php