note 37547 added to function.mb-decode-numericentity

From: Date: Wed, 19 Nov 2003 12:43:18 +0000
Subject: note 37547 added to function.mb-decode-numericentity
Groups: php.notes 
Request: Send a blank email to php-notes+get-60619@lists.php.net to get a copy of this message
Just two great functions for daily use: /* Converts any HTML-entities into characters */ function my_numeric2character($t) { $convmap = array(0x0, 0x2FFFF, 0, 0xFFFF); return mb_decode_numericentity($t, $convmap, 'UTF-8'); } /* Converts any characters into HTML-entities */ function my_character2numeric($t) { $convmap = array(0x0, 0x2FFFF, 0, 0xFFFF); return mb_encode_numericentity($t, $convmap, 'UTF-8'); } print my_numeric2character('’ ἀ â'); print my_character2numeric(' ’ â '); ---- Manual Page -- http://www.php.net/manual/en/function.mb-decode-numericentity.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+37547 Delete -- http://master.php.net/manage/user-notes.php?action=delete+37547&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+37547&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#60619) next »