Php decodear html


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function decodeHTML( $string ) {
  2. $string = strtr( $string, array_flip(get_html_translation_table( HTML_ENTITIES ) ) );
  3. $string = preg_replace( "/&#([0-9]+);/me", "chr('\\1')", $string );
  4. return $string;
  5. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.