Tutorial PHP: Cara nak loop year


$tahun=date('Y'); //get current year

for ($i = 0; $i <= 5; ++$i)
{
$tahun--;
echo $tahun."
";

}


// output: if current year = 2010
2010
2009
2008
2007
2006
2005
2004

POSTED BY juong

Popular Posts

.

Back to Top