开发者

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'))

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜