Mktime problem, THIS IS NOT POSSIBLE!

I don’t know much PHP, but this just has to work, right? I must be missing something very elementary… be gracious please :slight_smile:

while ($events_array = mysql_fetch_assoc($events_remote))
{
$event_date = date (“Y/m/d”, mktime(0,0,0,$events_array[‘event_year’],$events_array[‘event_month’],$events_array[‘event_day’]));
$event_id = $events_array[‘event_id’];
$event_status = $events_array[‘event_status’];
$event_title = $events_array[‘event_title’];
$event_desc = $events_array[‘event_desc’];
$date = date (“l, jS F Y”, mktime(0,0,0,$events_array[‘event_month’],$events_array[‘event_day’],$events_array[‘event_year’]));

echo $date returns Tuesday, 23rd February 2010 (good)
echo $event_date returns 1969/12/31 (WTF!!)

must go out now, but will be back in an hour or two. MANY THANKS!

Look carefully at the order that you passed your parameters to mktime().

THANKS Jake - that WAS gracious, I’ve never been called a fool so nicely! :slight_smile: I think I get it… I was getting things from array in the wrong order, yes?

hey, while I’m at it, maybe you can answer this one too:

I have a form which I use to update numerous fields of a record I pull from a table. at the same time the form displays each field’s current value with an echo. is this okay, or am I asking for trouble? I ask because I’m new and have not seen anyone else doing this.

THANKS AGAIN!

Yeah, the parameters are as follows:

As for your second question, I can’t really see a problem with displaying current values in modification forms :slight_smile:

I do it :shifty:

yea I looked at that myself but I figured I was doing something special ! :slight_smile: I’m learning…

okay, last one here if you don’t mind. but it’s a biggie!!

soon will be looking about for a hopefully simple, clean, elegant way to set-up and execute recurring events in my PHP driven calendar. I guess a regular schedule is a better way to put it. for example - every other weekend I need to do this or that. every third Tuesday I wash the car - whatever…

any advice, or maybe a link or two?

thanks once more Jake!