cakePHP-在index.ctp中设置默认的当前年份

cakePHP-在index.ctp中设置默认的当前年份,cakephp,Cakephp,我是cakePHP的新手。 我在index.ctp中显示默认当前年份时遇到一些问题 此代码为index.ctp <?php echo $html->tableCells (array (array ('Course', $form->select('id',$courses) ),

我是cakePHP的新手。 我在index.ctp中显示默认当前年份时遇到一些问题 此代码为index.ctp

<?php 
    echo $html->tableCells  (array  (array  ('Course', 
                                            $form->select('id',$courses)
                                            ),

                                    array   ('Location', 
                                            $form->select('id',$locations)
                                            ),
                                    array   ('Month', 
                                            $form->month('mob')
                                            ),
                                    array   ('Year', 
                                            $form->year('year',2011,2012)
                                            ),

                                    )
                            );
?>

感谢您的支持:

试试$form->year'year',20112012,date'Y'