php string contains html number to special characters code -


i'm working on kruti dev 010 font string contains html number

& #39; ,& amp;,& quot; 

i want convert word ' & "

<?php  $string="my string &#39;"; echo html_entity_decode($string); //not working ?> 

i want output

my string ' 

quotes quick snag when first try them. trick add ent_quotes function. see htmlspecialchars_decode

<?php      $string="my string &#39";     echo htmlspecialchars_decode( "my string &#39;" , ent_quotes ); ?> 

note: semi-colon @ end of character being decoded not necessary, overall considered posture. left out above better match ops -original- code.


Comments