i'm trying to create a drop down tht contains the first Monday of each
week, including the current week.
From the function, I need to out put 2 bits of data:
1. the date in a happy DB compliant manner (YYYY-MM-DD)
2. the date in a user Friendly way (2nd April etc)

Can a function even output 2 bits of data?

Anyone more clever than me, care to run the code below, and tell me
what I'm doing wrong?

Hmmm

===============

function showMondays($noWeeksBack = 10) {
        $oneDay = 86400;
        $WeekDayNumber = date('w');
        
        for ($i = -1; $i <= $noWeeksBack; $i++) {
                $prevWeeks = $i * 7;
                $prevWeeks = $prevWeeks + 6;
                $showWeekStart[] = date("jS M Y",time() - ($WeekDayNumber +
$prevWeeks) * $oneDay);
                $showFullDate[] = date("Y-m-d",time() - ($WeekDayNumber +
$prevWeeks) * $oneDay);
        }
        
        return $showWeekStart;
        return $showFullDate;
}

        $getMondays = showMondays(4);
        
        foreach ($getMondays as $value) {
                $i++;
                $showDates .= "<option value=\"" . $value["showFullDate"] . 
"\">" .
$value["showFullDate"] . "</option>\n";
        }

===================

--
When a person can no longer laugh at himself, it is time for others to
laugh at him.
Thomas Szasz

____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
      Send Your Posts To: [email protected]
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.

Reply via email to