Re: strlen ?
| From: | Caio Tavares | Date: | Thu, 11 Jul 2013 14:34:59 +0000 |
| Subject: | Re: strlen ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-321606@lists.php.net to get a copy of this message | ||
Try with mb_strlen
see
http://www.php.net/manual/en/function.mb-strlen.php
2013/7/5 Jim Giner <jim.giner@albanyhandball.com>
> Trying to manage line breaks in some output I'm generating and using
> strlen to measure the lengths of the strings I'm printing. Discovered
> something strange (to me!) in that strlen is returning +1 more than it
> should.
>
> The strings are from a query of my database - simple name fields. But
> everyone of them is coming back with a length that is one more than I see.
>
> Ex.
>
> Mike Hall comes back as 10, not 9
> F.B. comes back as 5, not 4.
>
> I've looked at my data and counted the chars - there is no extra space at
> the beginning or end in my table.
>
> Anyone have an explanation?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>