Re: [PHP] help me split chars w/o spaces by 2... like: 2004

2004-12-09 Thread ApexEleven
tride using chop() ? > > # begin code > > $year_split = date("Y"); > > $chars = chop($year_split); > > $chars[0] // = 2 > > $chars[1] // = 0 > > $chars[2] // = 0 > > $chars[3] //= 4 > > # end code > > I hope that will help >

Re: [PHP] help me split chars w/o spaces by 2... like: 2004

2004-12-08 Thread Louie Miranda
TED]> > >Reply-To: Louie Miranda <[EMAIL PROTECTED]> > >To: [EMAIL PROTECTED] > >Subject: [PHP] help me split chars w/o spaces by 2... like: 2004 > >Date: Thu, 9 Dec 2004 09:55:57 +0800 > >MIME-Version: 1.0 > >Received: from pb1.pair.com ([216.92.

Re: [PHP] help me split chars w/o spaces by 2... like: 2004

2004-12-08 Thread Robby Russell
On Thu, 2004-12-09 at 09:55 +0800, Louie Miranda wrote: > Help me split chars w/o spaces by 2... like: 2004 > How can i make it? > > first: 20 > second: 04 > > Im working on this.. > > # begin code > $year_split = date("Y"); > $chars = preg_split('//', $year_split, -1, PREG_SPLIT_NO_EMPTY);

RE: [PHP] help me split chars w/o spaces by 2... like: 2004

2004-12-08 Thread Tyler Replogle
MAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: [PHP] help me split chars w/o spaces by 2... like: 2004 Date: Thu, 9 Dec 2004 09:55:57 +0800 MIME-Version: 1.0 Received: from pb1.pair.com ([216.92.131.4]) by mc6-f24.hotmail.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 8 Dec 2004 17:56:52 -0800

[PHP] help me split chars w/o spaces by 2... like: 2004

2004-12-08 Thread Louie Miranda
Help me split chars w/o spaces by 2... like: 2004 How can i make it? first: 20 second: 04 Im working on this.. # begin code $year_split = date("Y"); $chars = preg_split('//', $year_split, -1, PREG_SPLIT_NO_EMPTY); # end code But it splits the whole "2004" string.. Array ( [0] => 2