2013年4月30日

php得到所有的汉字

摘要: <?phpheader('Content-Type: text/html;charset=utf8');//输出所有汉字$start = hexdec('4e00');$end = hexdec('9fa5');for($i=$start; $i<$end; $i++) { print_r(json_decode('["\u'.dechex($i).'"]'));}总结: 4e00为汉字十六进制的下界,9fa5为汉字十六进制的上界,我们遍历每一个汉字的十六进制对应得十进制码,然后再通 阅读全文

posted @ 2013-04-30 15:01 mtima 阅读(394) 评论(0) 推荐(0)

导航