note 52160 modified in function.strlen by thiago
| From: | thiago@php.net | Date: | Wed, 11 Feb 2009 14:04:37 +0000 |
| Subject: | note 52160 modified in function.strlen by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-150482@lists.php.net to get a copy of this message | ||
Beware: strlen() counts new line characters at the end of a string, too!
<?php
$a = "123\n";
echo "<p>".strlen($a)."</p>";
?>
The above code will output 4.
--was--
Beware: strlen() counts new line characters at the end of a string, too!
$a = "123\n";
echo "<p>".strlen($a)."</p>";
The above code will output 4.
http://php.net/manual/en/function.strlen.php