Answers for "php how convert back the special characters in string"

PHP
3

php escape special characters

/*  EXAMPLE:	<p>Bed & Breakfast</p>	-->	  <p>Bed &amp; Breakfast</p>  
    & 	&amp;
    " 	&quot; 				(unless ENT_NOQUOTES is set)
    ' 	&#039; or &apos; 	(ENT_QUOTES must be set)
    < 	&lt;
    > 	&gt;				*/

<?php
$new = htmlspecialchars("<a href='test'>Test</a>", ENT_QUOTES);
echo $new; 					// <a href='test'>Test</a>
?>
Posted by: Guest on September-05-2021
0

php convert special characters to normal

iconv('utf-8', 'ascii//TRANSLIT', $text);
Posted by: Guest on September-20-2021

Code answers related to "php how convert back the special characters in string"

Browse Popular Code Answers by Language