Re: explode string variable

From: Date: Sat, 08 Mar 2003 21:54:34 +0000
Subject: Re: explode string variable
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-26197@lists.php.net to get a copy of this message
on 3/8/03 10:40 AM, André Sannerholt at sannerholt@freenet.de appended the following bits to my mbox: > Does anybody know how to "stop" an "explosion" of a string: Let me explain: > I want the variable to be devided in only two other ones! If for example: > $variable="Willy-Brandt-Platz-5" > > I want to have an array that looks like this: > $variable_array[0] should be "Willy" > $variable_array[1] should be "Brandt-Platz" Wrong list since doesn't involve databases. Should be on PHP-General. That said, use strtok: <http://www.php.net/manual/en/function.strtok.php> Sincerely, Paul Burney <http://paulburney.com/> <?php while ($self != "asleep") { $sheep_count++; } ?>

« previous php.db (#26197) next »