note 6493 deleted from function.strtok by nlopess

From: Date: Sun, 08 May 2005 07:43:51 +0000
Subject: note 6493 deleted from function.strtok by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-89106@lists.php.net to get a copy of this message
Note Submitter: vksgeneric at hotmail dot com ---- a lot of people implied it by now, but nobody wrote the magic solution. If you have, for example, a couple delimiters following each other, the example in this chapter: $tok = strtok ($string," "); while ($tok) { ... will fail. Instead, try something like this: $tok = strtok ($string, " "); while(!($tok === FALSE)){ ... (Yes, this is three '=' in a row...)

« previous php.notes (#89106) next »