RE: [PHP] break up variable and put each element in an array

2006-08-15 Thread Ivo F.A.C. Fokkema
On Mon, 14 Aug 2006 19:14:42 -0500, Richard Lynch wrote: > On Mon, August 14, 2006 2:41 am, Ivo F.A.C. Fokkema wrote: >> On Sat, 12 Aug 2006 16:36:36 -0500, Richard Lynch wrote: >>> On Fri, August 11, 2006 3:11 am, Ivo F.A.C. Fokkema wrote: Well, if it's true that some browsers on some platfor

RE: [PHP] break up variable and put each element in an array

2006-08-14 Thread Richard Lynch
On Mon, August 14, 2006 2:41 am, Ivo F.A.C. Fokkema wrote: > On Sat, 12 Aug 2006 16:36:36 -0500, Richard Lynch wrote: >> On Fri, August 11, 2006 3:11 am, Ivo F.A.C. Fokkema wrote: >>> Well, if it's true that some browsers on some platforms ignore the >>> W3C >>> standard, I guess we could use: >> >

RE: [PHP] break up variable and put each element in an array

2006-08-14 Thread Ivo F.A.C. Fokkema
On Sat, 12 Aug 2006 16:36:36 -0500, Richard Lynch wrote: > On Fri, August 11, 2006 3:11 am, Ivo F.A.C. Fokkema wrote: >> Well, if it's true that some browsers on some platforms ignore the W3C >> standard, I guess we could use: > > Or perhaps these browsers pre-date W3C standards. :-) Sure, but in

RE: [PHP] break up variable and put each element in an array

2006-08-12 Thread Richard Lynch
On Fri, August 11, 2006 3:11 am, Ivo F.A.C. Fokkema wrote: > Well, if it's true that some browsers on some platforms ignore the W3C > standard, I guess we could use: Or perhaps these browsers pre-date W3C standards. :-) > $datelist = > str_replace(array("\r\n","\n","\r"),'',$_POST['datelist']);

RE: [PHP] break up variable and put each element in an array

2006-08-12 Thread Richard Lynch
On Fri, August 11, 2006 2:40 am, Reinhart Viane wrote: > Actually, I know that it's browser/OS dependent, cuz I had a bunch of > Mac users who sent only \r all the time. > > This may be true only of OS 9, and you may not care about them > anymore, but there it is. > > I also would not be so quick t

RE: [PHP] break up variable and put each element in an array

2006-08-11 Thread Ivo F.A.C. Fokkema
On Thu, 10 Aug 2006 17:17:23 -0500, Richard Lynch wrote: > On Tue, August 8, 2006 3:47 pm, Fokkema, I.F.A.C. \(HKG\) wrote: If the user separates the dates by an enter in the textarea, you need to explode on "\r\n". To be able to handle both, you need to use split() o

RE: [PHP] break up variable and put each element in an array

2006-08-11 Thread Reinhart Viane
Actually, I know that it's browser/OS dependent, cuz I had a bunch of Mac users who sent only \r all the time. This may be true only of OS 9, and you may not care about them anymore, but there it is. I also would not be so quick to claim that Linux sends \r\n -- It could be dependent on the brows

RE: [PHP] break up variable and put each element in an array

2006-08-10 Thread Richard Lynch
On Tue, August 8, 2006 3:47 pm, Fokkema, I.F.A.C. \(HKG\) wrote: try this: $string = "3/01/2005 29/12/2005 2/01/2006 20/02/2006 28/12/2006 1/01/2007 15/02/2007"; $array = explode(' ', $string); foreach ($array as $value) echo "Date: $value"; >>> >>> If the user se

RE: [PHP] break up variable and put each element in an array

2006-08-08 Thread Fokkema, I.F.A.C. \(HKG\)
>>> try this: >>> >>> $string = "3/01/2005 29/12/2005 2/01/2006 20/02/2006 28/12/2006 >>> 1/01/2007 >>> 15/02/2007"; >>> $array = explode(' ', $string); >>> foreach ($array as $value) echo "Date: $value"; >> >> If the user separates the dates by an enter in the textarea, you need >> to >> explode o

RE: [PHP] break up variable and put each element in an array

2006-08-08 Thread Richard Lynch
On Tue, August 8, 2006 9:06 am, Reinhart Viane wrote: >> try this: >> >> $string = "3/01/2005 29/12/2005 2/01/2006 20/02/2006 28/12/2006 >> 1/01/2007 >> 15/02/2007"; >> $array = explode(' ', $string); >> foreach ($array as $value) echo "Date: $value"; > > If the user separates the dates by an enter

Re: [PHP] break up variable and put each element in an array

2006-08-08 Thread Richard Lynch
On Tue, August 8, 2006 8:02 am, Reinhart Viane wrote: > A. I have a page on which people can supply dates in a text area. > Dates are > entered like this: > 3/01/2005 > 29/12/2005 > 2/01/2006 > 20/02/2006 > 28/12/2006 > 1/01/2007 > 15/02/2007 > > B. Now I need this Post element to be broken int

RE: [PHP] break up variable and put each element in an array

2006-08-08 Thread Reinhart Viane
Thx all -Oorspronkelijk bericht- Van: Ivo F.A.C. Fokkema [mailto:[EMAIL PROTECTED] Verzonden: dinsdag 8 augustus 2006 16:17 Aan: Reinhart Viane CC: php-general@lists.php.net Onderwerp: RE: [PHP] break up variable and put each element in an array On Tue, 2006-08-08 at 16:06 +0200

RE: [PHP] break up variable and put each element in an array

2006-08-08 Thread Reinhart Viane
> try this: > > $string = "3/01/2005 29/12/2005 2/01/2006 20/02/2006 28/12/2006 1/01/2007 > 15/02/2007"; > $array = explode(' ', $string); > foreach ($array as $value) echo "Date: $value"; If the user separates the dates by an enter in the textarea, you need to explode on "\r\n". To be able to

RE: [PHP] break up variable and put each element in an array

2006-08-08 Thread Ivo F.A.C. Fokkema
On Tue, 2006-08-08 at 16:06 +0200, Reinhart Viane wrote: > > try this: > > > > $string = "3/01/2005 29/12/2005 2/01/2006 20/02/2006 28/12/2006 1/01/2007 > > 15/02/2007"; > > $array = explode(' ', $string); > > foreach ($array as $value) echo "Date: $value"; > > If the user separates the dates by

Re: [PHP] break up variable and put each element in an array

2006-08-08 Thread Ivo F.A.C. Fokkema
On Tue, 08 Aug 2006 14:50:53 +0100, Dave Goodchild wrote: > On 08/08/06, Reinhart Viane <[EMAIL PROTECTED]> wrote: >> >> A. I have a page on which people can supply dates in a text area. Dates >> are >> entered like this: >> 3/01/2005 >> 29/12/2005 >> 2/01/2006 >> 20/02/2006 >> 28/12/2006 >> 1/01/

Re: [PHP] break up variable and put each element in an array

2006-08-08 Thread Dave Goodchild
On 08/08/06, Reinhart Viane <[EMAIL PROTECTED]> wrote: A. I have a page on which people can supply dates in a text area. Dates are entered like this: 3/01/2005 29/12/2005 2/01/2006 20/02/2006 28/12/2006 1/01/2007 15/02/2007 B. Now I need this Post element to be broken into pieces (per date) and

[PHP] break up variable and put each element in an array

2006-08-08 Thread Reinhart Viane
A. I have a page on which people can supply dates in a text area. Dates are entered like this: 3/01/2005 29/12/2005 2/01/2006 20/02/2006 28/12/2006 1/01/2007 15/02/2007 B. Now I need this Post element to be broken into pieces (per date) and each of those pieces should be put into a text so the out