note 24836 rejected from function.strtok by irchtml
| From: | irchtml@php.net | Date: | Thu, 05 Feb 2004 06:23:07 +0000 |
| Subject: | note 24836 rejected from function.strtok by irchtml | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-64663@lists.php.net to get a copy of this message | ||
Note Submitter:
----
once again it is NOT strtok that fails but your (dxue69@hotmail.com) loop test.
That the string "0" evaluates to false in a boolean context is emphasized in the last
sentence of this manual page!!!
if you have php4 use while($str !== false)
if you have php3 you can use while(is_string($str)).
my humble piece of advice to the documentation editors if they want to avoid editing this same
mistake over and over again (not only in this page but in the whole manual, this is probably the
most frequent error in posts throughout the website!) would be to use correct comparison tests in
the exemples
Ivan