Re: [PHP] strlen ?

[email protected] (Caio Tavares)
Newsgroups php.general
Message-ID <CAN4CysemxEqb3NKoKUJtPZ2zMe8xGWY+bD3+0ByUWCxRKo5Q7w@mail.gmail.com>
Try with mb_strlen

see
http://www.php.net/manual/en/function.mb-strlen.php


2013/7/5 Jim Giner <[email protected]>

> 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
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.