event calender date problem
Posted: Thu Jun 03, 2010 5:43 am
hi, im making an event calender and having a problem with a variable containing the time stamp here is the code.
here is the line whith the problem
im not so good with dates even without php and im not so good with the date func,but i know ill need the time stemp for things like month or year,later.
Code: Select 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=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php
$day=date('j');
$month=date('n');
$year=date('y');
echo$day."/".$month."/".$year;
$curentTimestamp=strtotime("$day-$month-$year");
$monthname=date("f",$curentTimestamp);
$numdays=date("t",$curentTimestamp);
$counter=0;
?>
<table width="200" border="1">
<tr>
<td> </td>
<td colspan="5"><?php echo $monthname;?></td>
<td> </td>
</tr>
<tr>
<td width='50'>sun</td>
<td width='50'>mon</td>
<td width='50'>tue</td>
<td width='50'>wed</td>
<td width='50'>thu</td>
<td width='50'>fri</td>
<td width='50'>sat</td>
</tr>
</table>
</body>
</html>
Code: Select all
$curentTimestamp=strtotime("$day-$month-$year");