Re: strings

From: Date: Fri, 01 Dec 2000 01:52:37 +0000
Subject: Re: strings
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-28155@lists.php.net to get a copy of this message
Does get_next_month maybe dink around with it? Try setting $d[$i] before you call get_next_month and see what you get. ----- Original Message ----- From: Thomas Holton <holton@mbi.ucla.edu> Newsgroups: php.general Sent: Thursday, November 30, 2000 4:14 PM Subject: [PHP] strings > > Hi, I am confused why the following does not work: > > <snip> > $day[$i] = mysql_result($r,$j,"day"); > $day[$i] .= "-"; > $item = explode("-", $day[$i]); > $y[$i] = $item[0]; > $m[$i] = get_next_month($item[1]); > $d[$i] = $item[2]; > print "Stored $i: m=$m[$i],d=$d[$i],y=$y[$i] == $day[$i]"; > <snip> > > prints: > Stored 0: m=Nov,d=3,y=2000 == 2000-11-30- > > my question is: why does the $d[$i] var only get only number, 3, instead > of 30, when the $y[$i] var gets all four, or 2000? > > TIA > -tom > > > > -- > 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 (#28155) next »