array months
| From: | peppe | Date: | Wed, 25 Feb 2004 14:18:35 +0000 |
| Subject: | array months | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-33117@lists.php.net to get a copy of this message | ||
Hi I realy need help hier
I have a aaray of months
$lang['months'] = array
( 1 => "Januari", 2 => "Februari", 3 => "Maart", 4 =>
"April", 5 => "Mei",
6 => "Juni", 7 => "Juli", 8 => "Augustus", 9 =>
"September", 10 =>
"Oktober",
11 => "November", 12 => "December"
);
and a function
function showMonths2($montharray)
{
$maand = sprintf("%d", date("m"));
$jaar = date("Y");
for ($inx=$maand; $inx<=12; $inx++)
echo "<a
href='welkom.php?welkom_id=6&month=$inx&year=$jaar'>$montharray[$inx]
</a> ";
$jaar++;
for ($inx=0; $inx<$maand; $inx++)
echo "<a
href='welkom.php?welkom_id=6&month=$inx&year=$jaar&ver=ok'>$montharray[$inx]
</a> ";
}
The result is starts from Februari Maart .. .. December and then Januari
2005 the problem is when I click Januari 2005 I want to show months from
Januari 2005 till December 2005 and so on