Unifix knowledge database - The original one

Dashboard - News - Search - List - About - Admin


PHP unicode decoder

Author:black - Wed Jun 18 18:48:41 2003

function unicode_decode($txt) {
 $txt = preg_replace_callback(
  '/%u([[:alnum:]]{4})/',
  create_function('$match', 'return "&#".hexdec($match[1]).";";'),
  $txt
 );
 $txt = preg_replace_callback(
  '/%([[:alnum:]]{2})/',
  create_function('$match', 'return "&#".hexdec($match[1]).";";'),
  $txt
 );
 return ($txt);
}


Copyright(c) Unifix.org 2002-2011


Dashboard - News - Search - List - About - Admin
 
Powered by Mikjaer Consulting Solutions - Hosted by Specialhosting.dk