note 42642 added to function.count-chars
| From: | ejans at 163 dot com | Date: | Tue, 25 May 2004 02:36:37 +0000 |
| Subject: | note 42642 added to function.count-chars | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-70046@lists.php.net to get a copy of this message | ||
<?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.
----
Manual Page -- http://www.php.net/manual/en/function.count-chars.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+42642
Delete -- http://master.php.net/manage/user-notes.php?action=delete+42642&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+42642&report=yes
Search -- http://master.php.net/manage/user-notes.php