note 24836 added to function.strtok

From: Date: Thu, 29 Aug 2002 17:58:47 +0000
Subject: note 24836 added to function.strtok
Groups: php.notes 
Request: Send a blank email to php-notes+get-35994@lists.php.net to get a copy of this message
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 -- http://www.php.net/manual/en/function.strtok.php http://master.php.net/manage/user-notes.php?action=edit+24836 http://master.php.net/manage/user-notes.php?action=delete+24836 http://master.php.net/manage/user-notes.php?action=reject+24836

« previous php.notes (#35994) next »