Nieuw lid |
|
Beste,
Ik wil een kaledner maken maar krijg het niet goed ge echo'd....
Ik gheb de juiste informatie maar weet niet hoe deze weer te geven nu... iemand die mij dit kan uitleggen? (in de loop)...
mijn code:
<?php
error_reporting(E_ALL);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<table border="0px" cellpadding="2px" cellspacing="2px">
<tr bgcolor="#CCCCCC" style="text-align:center; font-weight:bold; font-size:26px;">
<td colspan="7">2009</td>
</tr>
<tr bgcolor="#CCCCCC" style="text-align:center; font-weight:bold; font-size:14px;">
<td width="50px">Monday</td><td width="50px">Thuesday</td><td width="50px">Wednesday</td><td width="50px">Thursday</td><td width="50px">Friday</td><td width="50px">Saturday</td><td width="50px">Sunday</td>
</tr>
<?php
// asked year and month
$year = 2009;
$month = 8;
$day = 16;
$nr_days = cal_days_in_month(CAL_GREGORIAN, $month, $year);
for($i = 0; $i < $nr_days; $i++)
{
// informatie over de dag ophalen
$requested_month = unixtojd(mktime(0, 0, 0, $month, $i, $year));
#### print_r(cal_from_jd($requested_month, CAL_GREGORIAN)); ####
// weergeven
}
?>
</table>
</body>
</html>
<?php ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <table border="0px" cellpadding="2px" cellspacing="2px"> <tr bgcolor="#CCCCCC" style="text-align:center; font-weight:bold; font-size:26px;"> <td colspan="7">2009</td> </tr> <tr bgcolor="#CCCCCC" style="text-align:center; font-weight:bold; font-size:14px;"> <td width="50px">Monday</td><td width="50px">Thuesday</td><td width="50px">Wednesday</td><td width="50px">Thursday</td><td width="50px">Friday</td><td width="50px">Saturday</td><td width="50px">Sunday</td> </tr> <?php // asked year and month $year = 2009; $month = 8; $day = 16; for($i = 0; $i < $nr_days; $i++) { // informatie over de dag ophalen #### print_r(cal_from_jd($requested_month, CAL_GREGORIAN)); #### // weergeven } ?> </table> </body> </html>
|