hi

strlen() showes count for ascci characters right. but when we have some unciode characters in string it does not show count of characters.

for example:

$message="aسb";
echo strlen($message);

It showes 4 but i have 3 characters. i need to it showes 3.

    You could try:

    $message="aسb";
    echo mb_strlen($message, 'utf-8');

    but the multibyte string functions extension must be enabled.

      You'll need to use the [man]MBString[/man] extension, e.g. [man]mb_strlen/man.

        Write a Reply...