Re: problem w/ printing array value 4.01

From: Date: Tue, 04 Jul 2000 01:51:37 +0000
Subject: Re: problem w/ printing array value 4.01
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-4640@lists.php.net to get a copy of this message
In article <00e101bfe2be$1168aec0$0400000a@mark>, mmucha@cfl.rr.com ("Mark Mucha Crocbyte,Inc.") wrote: > $jobDate is in the format of YYYY-MM-DD > > When I run this code I get " Array" written in the input box rather than = > the year. > > <? > $dateS[] =3D explode("-", $jobDate); explode() returns an array. You are then stuffing this entire array into the next (presumably 0th) element of $dateS. So you actually have: ((YYYY, MM, DD)) instead of (YYYY, MM, DD) that you want. Get rid of the [] here. > ?> > MM:<input type=3D"text" name=3D"month" size=3D"2" > maxlength=3D"2"> > DD:<input type=3D"text" name=3D"day" size=3D"2" > maxlength=3D"2"> > YYYY:<input type=3D"text" name=3D"year" size=3D"4" > maxlength=3D"4" = > value=3D"<? echo $dateS[0] ?>"> > > > > HELP > > Thanks > > Mark > > > ------=_NextPart_000_00DE_01BFE29C.88DE2A60-- -- Richard Lynch | If this was worth $$$ to you, buy a CD US Customer Support Director | from one of the artists listed here: Zend Technologies USA | http://www.L-I-E.com/artists.htm http://www.zend.com | (this has nothing to do with Zend, duh!)

« previous php.general (#4640) next »