Vorige maand en volgende maand uit bepaalde datum

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Thomas de Roo

Thomas de Roo

26/10/2010 15:04:41
Quote Anchor link
Ik heb een stuk code, dat van de vorige, huidige en komende maand een kalender laat zien, nu is mijn vraag, hoe kan ik dit gebruiken in combinatie met een gegeven maand en jaar (bijv: 05;2010 of 11;2010)?
Echt verder dan
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
<?php
$date
= explode(";", $_GET['date']);
?>

kom ik niet....

Thomas

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
     $today
=  date("Y-m-d");
     $nextmonth = date("Y-m-d",strtotime("+1 months"));
     $premonth = date("Y-m-d",strtotime("-1 months"));
     $today_month = date("m", strtotime($today));
     $nextmonth_month = date("m", strtotime($nextmonth));
     $premonth_month = date("m", strtotime($premonth));
     $today_year = date("Y", strtotime($today));
     $nextmonth_year = date("Y", strtotime($nextmonth));
     $premonth_year = date("Y", strtotime($premonth));
     $parameters = array(
     'today' => $today_month.";".$today_year,
     'nextmonth' => $nextmonth_month.";".$nextmonth_year,
     'premonth' => $premonth_month.";".$premonth_year
     );
     echoCalendar($parameters["premonth"]);
     echoCalendar($parameters["today"]);
     echoCalendar($parameters["nextmonth"]);
?>
 
PHP hulp

PHP hulp

02/06/2024 16:43:45
 

26/10/2010 15:10:08
Quote Anchor link
datetime classes gebruiken.
 
Thomas de Roo

Thomas de Roo

26/10/2010 15:16:09
Quote Anchor link
En welke functie, als ik vragen mag?
 



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.