How can i decode html entities in php? -



How can i decode html entities in php? -

i trying convert html entities not working.

$string_with_bold_tag = "<b>hello world </b&gt"; $converted = html_entity_decode($string_with_bold_tag); echo $converted;

its homecoming hello world bold tag. thought doing wrong?

your string have issue in syntax, seek this:

$string_with_bold_tag = "<b>hello world </b>"; //you missed semi colon here $converted = html_entity_decode($string_with_bold_tag); echo $converted;

at end of input string there no semicolon &gt -> &gt ;

in order interpreted correctly need right syntax.

php html decode

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -