Re: Quickie question with explode.

From: Date: Thu, 24 Oct 2002 12:13:00 +0000
Subject: Re: Quickie question with explode.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-121239@lists.php.net to get a copy of this message
$array = preg_split('/[;,]/',$string); Probably faster than str_replace/explode. ---John Holmes... ----- Original Message ----- From: "Simon Taylor" <simon.taylor@afritol.co.za> To: <php-general@lists.php.net> Sent: Thursday, October 24, 2002 7:58 AM Subject: [PHP] Quickie question with explode. > Hi All, > I have some lists that are separated by either ';' or ',' or a mix of the > two, I wish to use xplode to get the values, is there a way to use explode > like this.. > > $ar = explode (';'or',',$string); > > Thanks in advance > > ____________________________________ > Simon Taylor > AfriTol (Pty) Ltd. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#121239) next »