Re: split() function

From: Date: Wed, 04 Jul 2001 18:50:29 +0000
Subject: Re: split() function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-56217@lists.php.net to get a copy of this message
$line = explode("[(&|//)]",$field); should work, or you might have to put //// but thats not \ so you shouldn't need to comment out the slash... ----- Original Message ----- From: David A Dickson <daviddickson@lycos.com> To: php-general <php-general@lists.php.net> Sent: Thursday, July 05, 2001 4:37 AM Subject: [PHP] split() function > I have a comma separated spreadsheet with one field that contains two dates. the dates are formatted as dd/mm/yy and separated by either '&' or '//' ex:3/12/92&28/1/93 or 3/12/92//28/1/93 > Problem: I need to split the field at the '&' or '//' separator but if > I do > split('[&//]', $field); > it splits on the '/' not the '//'. > Can I do this in one function call to split() or will I have to do it twice? > --- > : David A. Dickson > : Web Designer for the offices of Principal and Provost > : McGill University > : Tel 514-398-2624 | Fax 514-389-8983 > : daviddickson@lycos.com > > > > > Get 250 color business cards for FREE! > http://businesscards.lycos.com/vp/fastpath/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#56217) next »