note 6493 modified in strtok by ronabop

From: Date: Wed, 04 Oct 2000 15:41:31 +0000
Subject: note 6493 modified in strtok by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-6073@lists.php.net to get a copy of this message
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...) http://www.php.net/manual/function.strtok.php

« previous php.notes (#6073) next »