开发者

cakePHP - make a default current year in index.ctp

开发者 https://www.devze.com 2023-03-26 23:33 出处:网络
I newbie in cakePHP. I has some problem on display default current year in index.ctp This code of 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

精彩评论

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