Answers for "php parse special characters"

PHP
1

php decode html special characters

$str = "This is some <b>bold</b> text.";
echo htmlspecialchars_decode($str);
// out will be like:
// This is some <b>bold</b> text.
Posted by: Guest on June-11-2021
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

$str = "d&#039;&eacute;tudes"; //string with special characters
$normal_str = html_entity_decode($str, ENT_QUOTES);  //d'études(studies in english)
Posted by: Guest on September-10-2021

Code answers related to "php parse special characters"

Browse Popular Code Answers by Language