Re: getdate - how to format date back from mysql db

From: Date: Thu, 14 Sep 2000 00:43:44 +0000
Subject: Re: getdate - how to format date back from mysql db
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-16666@lists.php.net to get a copy of this message
getdate() returns an array. You will have to specify the array elements that you want to display: echo "$add_date[somethinghere]/$add_date[somethingelsehere]/$add_date[somethingelsehere]"; check www.php.net Jason wrote: > hi all > i have a survey page that is writing a date to a mysql db when the user > fills out the survey....i use > $add_date = date("Y-m-d G:i:s"); > > which writes it to the db in a standard format... > > the problem i have is reading it back in php when i want to check on the > survey results... > > so i want it to read to screen the name of the person and what time/date > they took the survey.. > > echo "<TD><font face=Verdana, Arial, Helvetica, sans-serif size=1 color = > #000000>$f_name $l_name did the survey on $add_date > </font></TD></TR>"; > > Jason Savidge did the survey on 14th September 2000 at 9.05pm > > i have tried getdate() and tried to use the foreach function but just keep > getting back "Array" instead of the info... > > can anyone suggest a fix or another way...i'm sure there must be an easier > way!! > > many thanks > > Regards > Jason > IT Manager > Brisbane Australia

« previous php.general (#16666) next »