note 42642 rejected from function.count-chars by tomsommer
| From: | tomsommer@php.net | Date: | Tue, 25 May 2004 17:11:38 +0000 |
| Subject: | note 42642 rejected from function.count-chars by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-70068@lists.php.net to get a copy of this message | ||
Note Submitter: ejans@163.com
----
<?php
$data = "ÎÒµÄÍɱä"; // this is chinese words.
$result = count_chars($data, 0);
for ($i=0; $i < count($result); $i++) {
if ($result[$i] != 0)
echo "There were $result[$i] instance(s) of \"" , chr($i) , "\" in
the string.\n"."<br>";
}
?>
i use chinese, why output is
There were 1 instance(s) of "? in the string.
There were 1 instance(s) of "? in the string.
There were 1 instance(s) of "? in the string.
There were 1 instance(s) of "? in the string.
There were 1 instance(s) of "? in the string.
There were 1 instance(s) of "? in the string.
There were 1 instance(s) of "? in the string.
There were 1 instance(s) of "? in the string.