• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Generating week

#6
[eluser]Spir[/eluser]
Nice. I have tried this :

Code:
// July 1, 2000
$arr = get_week(date(mktime(0, 0, 0, 7, 1, 2000)));

for ($i=0;$i<count($arr);$i++){
    echo date('d m Y', $arr[$i]).'<br />';
}

Which output this :
Quote:25 06 2000
26 06 2000
27 06 2000
28 06 2000
29 06 2000
30 06 2000
01 07 2000

So now if I want my week to start with monday I have to change the range right?

Code:
$week_days = range(1,7);


Messages In This Thread
Generating week - by El Forum - 11-30-2008, 06:03 PM
Generating week - by El Forum - 12-01-2008, 12:53 AM
Generating week - by El Forum - 12-01-2008, 01:38 AM
Generating week - by El Forum - 01-28-2009, 05:09 AM
Generating week - by El Forum - 01-28-2009, 06:23 AM
Generating week - by El Forum - 01-28-2009, 10:41 AM
Generating week - by El Forum - 01-30-2009, 03:47 AM
Generating week - by El Forum - 01-30-2009, 03:49 AM
Generating week - by El Forum - 04-24-2013, 06:09 AM
Generating week - by El Forum - 04-24-2013, 06:20 AM
Generating week - by El Forum - 04-24-2013, 06:33 AM
Generating week - by El Forum - 04-24-2013, 06:36 AM
Generating week - by El Forum - 04-24-2013, 06:50 AM
Generating week - by El Forum - 04-24-2013, 07:03 AM
Generating week - by El Forum - 04-24-2013, 07:05 AM
Generating week - by El Forum - 04-24-2013, 07:09 AM
Generating week - by El Forum - 04-24-2013, 07:11 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.