Jim Giner wrote:
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?

Does strlen count the line feed?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to