briant Posted October 27, 2006 Share Posted October 27, 2006 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. Link to comment https://forums.phpfreaks.com/topic/25328-how-to-count-special-characters-function/ Share on other sites More sharing options...
kenrbnsn Posted October 27, 2006 Share Posted October 27, 2006 Take a look at the [url=http://us3.php.net/manual/en/ref.mbstring.php]multibyte string handling functions[/url].Ken Link to comment https://forums.phpfreaks.com/topic/25328-how-to-count-special-characters-function/#findComment-115490 Share on other sites More sharing options...
briant Posted October 27, 2006 Author Share Posted October 27, 2006 I get a weird error when I use mb_strlenFatal error: Call to undefined function: mb_strlen() in /home/mysite/public_html/mypage.php on line 223Here is my example:echo mb_strlen('êộờ', 'UTF-8'); Link to comment https://forums.phpfreaks.com/topic/25328-how-to-count-special-characters-function/#findComment-115507 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.