an array problem in oop

Discussion in 'PHP' started by promotingspace.net, Mar 4, 2008.

  1. #1
    Hi
    this is a function to create selecy field in html form:
    function addSelect($name, $label, $default, &$options) {
    		$this->_elements[$name] = array('type' => 'select', 'label' => $label, 'value' => $default,
    			'options' => $options);
    	}
    PHP:
    I will use that function this way:
    $form->addSelect('accounttype', Your Account Type, '', &$options);
    PHP:
    and I want my options to be Egold and Paypal but how should i define my options?
    thanks
     
    promotingspace.net, Mar 4, 2008 IP
  2. able

    able Peon

    Messages:
    44
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Make it an array? I don't really understand why you have a problem?
     
    able, Mar 4, 2008 IP
  3. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #3
    I don't understand your question either.
     
    nico_swd, Mar 5, 2008 IP
  4. promotingspace.net

    promotingspace.net Peon

    Messages:
    361
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    thanks for your attention,
    problem solved
     
    promotingspace.net, Mar 5, 2008 IP