Re: [PHP] split() function

2001-07-04 Thread Steve Edberg
you shouldn't need to comment out the slash... >>- Original Message ----- >>From: David A Dickson <[EMAIL PROTECTED]> >>To: php-general <[EMAIL PROTECTED]> >>Sent: Thursday, July 05, 2001 4:37 AM >>Subject: [PHP] split() function >> >> >&g

Re: [PHP] split() function

2001-07-04 Thread David A Dickson
Thanks that helped, this is what I used: if (ereg("&", $field)) $line = explode("&", $field); else $line = explode("//", $field); On Thu, 5 Jul 2001 05:29:11 ReDucTor wrote: >$line2 = explode("", $field); >for($i = 0; $i < sizeof($line2); $i++){ > if($line2[$i] == "&") > $useand = 1; >

Re: [PHP] split() function

2001-07-04 Thread David A Dickson
1 04:50:29 ReDucTor wrote: >$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 <[EMAIL PROTECTED]> >To: php-g

Re: [PHP] split() function

2001-07-04 Thread ReDucTor
, 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

[PHP] split() function

2001-07-04 Thread David A Dickson
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 spli