note 30564 deleted from function.chr by danbrown
| From: | danbrown@php.net | Date: | Wed, 15 Sep 2010 21:18:23 +0000 |
| Subject: | note 30564 deleted from function.chr by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-172610@lists.php.net to get a copy of this message | ||
Note Submitter: avenger at php dot net
----
I usally used this code to test a Chinese string:
<?php
$chinese_str = "³Â²®ÀÖ";
if (preg_match("/^[".chr(0xa1)."-".chr(0xff)."_-]+$/",$chinese_str) {
echo 'This is a Chinese word..';
} else {
echo 'This is not a Chinese word..';
}
?>