Jump to content

Archived

This topic is now archived and is closed to further replies.

briant

How to count special characters function?

Recommended Posts

I know the strlen function counts characters but not special characters. For example, I want this : êộờ to be only 3 characters, not 8 or whatever the strlen function gives.

Share this post


Link to post
Share on other sites
Take a look at the [url=http://us3.php.net/manual/en/ref.mbstring.php]multibyte string handling functions[/url].

Ken

Share this post


Link to post
Share on other sites
I get a weird error when I use mb_strlen

Fatal error: Call to undefined function: mb_strlen() in /home/mysite/public_html/mypage.php on line 223


Here is my example:

echo mb_strlen('êộờ', 'UTF-8');

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.