note 5482 modified in strlen by ronabop
| From: | ronabop@php.net | Date: | Sat, 21 Oct 2000 22:49:36 +0000 |
| Subject: | note 5482 modified in strlen by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-6810@lists.php.net to get a copy of this message | ||
Bug or feature? I want to treat a string as an array ("traverse it") like this, and it
gets me a warning about "illegal string index" when it reaches the end of the string.
$tmp=0; $s="blah";
while($c=$s[$tmp++]) { echo $c; }
This also spits warnings with "do {..} while(..)".
http://www.php.net/manual/function.strlen.php