 |
|
มามั่วก่อนจะไปกินข้าว 555+
Code (PHP)
<?php
$monthStart = 5;
$yearStart = 2007;
$monthEnd = 6;
$yearEnd = date('Y');
$offset = $time = mktime(0,0,0,$monthStart,1,$yearStart);
$limit = $time = mktime(0,0,0,$monthEnd,1,$yearEnd);
for ( $y = $yearStart; $y <= $yearEnd; $y++ )
{
for ( $m = 1; $m <= 12; $m++ )
{
$time = mktime(0,0,0,$m,1,$y);
if ( $time >= $offset && $time <= $limit )
echo sprintf('%02d', $m) . '-' . $y . '<br />';
}
}
?>
Output
05-2007
06-2007
07-2007
08-2007
09-2007
10-2007
11-2007
12-2007
01-2008
02-2008
03-2008
04-2008
05-2008
06-2008
07-2008
08-2008
09-2008
10-2008
11-2008
12-2008
01-2009
02-2009
03-2009
04-2009
05-2009
06-2009
|
 |
 |
 |
 |
Date :
2009-07-16 12:22:19 |
By :
danya |
|
 |
 |
 |
 |
|
|
 |