Re: explode() working like strtok()

From: Date: Tue, 15 Apr 2003 22:51:19 +0000
Subject: Re: explode() working like strtok()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-144036@lists.php.net to get a copy of this message
Just write your own, using something like &$str as the parameter you want to whittle away at. This will let you change the actual argument variable from inside the function. "Dale" <dalewalt@adelphia.net> wrote in message news:034d01c30374$d39eb870$6500a8c0@dalewalters... Greetings all! I have a text file that is separated into "records". I plan on having these records separated by a character (any character will do, as long as its unique). Ex. Data Line 1 Data Line 2 Data Line 3 ------------ Data Line 1 Data Line 2 Data Line 3 ------------ Data Line 1 Data Line 2 Data Line 3 ------------ strtok(), of course, only accepts a single character as the token, but explode() will accept a whole string. However, I want to continously tokenize the file like strtok() would do. Is there another function similar to explode() and strtok() that will tokenize repeatedly, AND accept a string as the token? Thanks for the help! Dale Walters dalewalt@adelphia.net

« previous php.general (#144036) next »