note 6494 deleted from strtok by ronabop

From: Date: Fri, 11 Aug 2000 18:27:58 +0000
Subject: note 6494 deleted from strtok by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-1388@lists.php.net to get a copy of this message
Darn! I just posted a note and it didn't like my &lt;PRE&gt; tags... hmmm... odd... <BR> I'll take my chances and post it again. A preview mode is a big plus (see how people did it on slashdot).<BR> 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: <PRE> $tok = strtok ($string," "); while ($tok) { ... </PRE> will fail. Instead, try something like this: <PRE> $tok = strtok ($string, " "); while(!($tok === FALSE)){ ... </PRE> (Yes, this is three '=' in a row...)

« previous php.notes (#1388) next »