cakePHP - make a default current year in index.ctp
I newbie in cakePHP. I has some problem on display default current year in index.ctp This code of index.ctp.
<?php
echo $html->tableCells (ar开发者_StackOverflowray (array ('Course',
$form->select('id',$courses)
),
array ('Location',
$form->select('id',$locations)
),
array ('Month',
$form->month('mob')
),
array ('Year',
$form->year('year',2011,2012)
),
)
);
?>
Thank you for your advanced :)
Try $form->year('year',2011,2012, date('Y'))
精彩评论