Jump to content

Jeff_Kugener

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Jeff_Kugener

  1. Hello guys, I have a problem with the function (strtotime) So the function &week post the week count, for example, the week 1, week 2, week 3, week 4, week 5, week 6 and when the week 6 is over then jump back to the week 1. Example: http://dev.prodesign.lu/week/home.php However, he is here on week 5 and yesterday he stood on the week 0 Actually, it should in turn go 1 - 2 - 3 - 4 - 5 - 6 Here my code: <?php $week = (strtotime(date('Y-m-d 00:00:00',time())) / 7 * 86400) % 6; switch($week) { case 1: echo " <b>Woche 1</b><br> <br> Montag Woche $week<br /> Dienstag Woche $week<br /> Mittwoch Woche $week<br /> Donnerstag Woche $week<br /> Freitag Woche $week<br /> Samstag Woche $week<br /> Sonntag Woche $week<br /> "; break; // case 2: echo " <b>Woche 2</b><br> <br> Montag Woche $week<br /> Dienstag Woche $week<br /> Mittwoch Woche $week<br /> Donnerstag Woche $week<br /> Freitag Woche $week<br /> Samstag Woche $week<br /> Sonntag Woche $week<br /> "; break; // case 3: echo " <b>Woche 3</b><br> <br> Montag Woche $week<br /> Dienstag Woche $week<br /> Mittwoch Woche $week<br /> Donnerstag Woche $week<br /> Freitag Woche $week<br /> Samstag Woche $week<br /> Sonntag Woche $week<br /> "; break; // case 4: echo " <b>Woche 4</b><br> <br> Montag Woche $week<br /> Dienstag Woche $week<br /> Mittwoch Woche $week<br /> Donnerstag Woche $week<br /> Freitag Woche $week<br /> Samstag Woche $week<br /> Sonntag Woche $week<br /> "; break; // case 5: echo " <b>Woche 5</b><br> <br> Montag Woche $week<br /> Dienstag Woche $week<br /> Mittwoch Woche $week<br /> Donnerstag Woche $week<br /> Freitag Woche $week<br /> Samstag Woche $week<br /> Sonntag Woche $week<br /> "; break; // case 6: echo " <b>Woche 6</b><br> <br> Montag Woche $week<br /> Dienstag Woche $week<br /> Mittwoch Woche $week<br /> Donnerstag Woche $week<br /> Freitag Woche $week<br /> Samstag Woche $week<br /> Sonntag Woche $week<br /> "; break; } ?> Thx for help
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.