addmultioption array problem in Zend

Posted by davykiash on Stack Overflow See other posts from Stack Overflow or by davykiash
Published on 2010-04-03T10:51:42Z Indexed on 2010/04/03 17:13 UTC
Read the original article Hit count: 317

Filed under:
|

Am trying to add options in my Zend_Form_Element_Select element

$monthvalues = new Zend_Form_Element_Select('month_values');
$table = new Model_DbTable_Options();
$monthvalues->addMultiOptions($table->Months())

In my Model_DbTable_Options model I have

public function Months()
    {
        $array = array(
        '01' => 'Jan',
        '02' => 'Feb',
        '03' => 'Mar',
        '04' => 'Apr',
        '05' => 'May',
        '06' => 'Jun',
        '07' => 'Jul',
        '08' => 'Aug',
        '09' => 'Sep',
        '10' => 'Oct',
        '11' => 'Nov',
        '12' => 'Dec',
        );

        return $array;
    }

It aint giving me the desired outcome. Whats missing?

© Stack Overflow or respective owner

Related posts about zend

Related posts about arrays