an array problem in oop

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
m2babaey
Forum Contributor
Posts: 364
Joined: Sun May 20, 2007 9:26 am

an array problem in oop

Post 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
Post Reply