protected function loadOptionsFromArray(
        HTML_QuickForm2_Element_Select_OptionContainer $container, $options
    )
    {
        foreach ($options as $key => $value) {
            if (is_array($value)) {
                $optgroup = $container->addOptgroup($key);
                $this->loadOptionsFromArray($optgroup, $value);
            } else {
                $container->addOption($value, $key);
            }
        }
    }
protected function loadOptionsFromArray(
        HTML_QuickForm2_Element_Select_OptionContainer $container, $options
    )
    {
        foreach ($options as $key => $value) {
            if (is_array($value)) {
                $optgroup = $container->addOptgroup($key);
                $this->loadOptionsFromArray($optgroup, $value);
            } else {
                $container->addOption($value, $key);
            }
        }
    }
protected function loadOptionsFromArray ( HTML_QuickForm2_Element_Select_OptionContainer $ container , $ options ) { foreach ( $ options as $ key => $ value ) { if ( is_array ( $ value ) ) { $ optgroup = $ container -> addOptgroup ( $ key ) ; $ this -> loadOptionsFromArray ( $ optgroup , $ value ) ; } else { $ container -> addOption ( $ value , $ key ) ; } } }
Adds options from given array into given container

@param    HTML_QuickForm2_Element_Select_OptionContainer  options will be
added to this container
@param    array   options array
Adds options from given array into given container