Page 1 of 1

an array problem in oop

Posted: Tue Mar 04, 2008 12:45 pm
by m2babaey
Hi
this is a function to create selecy field in html form:

Code: Select all

    function addSelect($name, $label, $default, &$options) {
        $this->_elements[$name] = array('type' => 'select', 'label' => $label, 'value' => $default,
            'options' => $options);
    }
I will use that function this way:

Code: Select all

$form->addSelect('accounttype', Your Account Type, '', &$options);
and I want my options to be Egold and Paypal but how should i define my options?
thanks