original_string: 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);
              }
          }
      }
code: 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);
              }
          }
      }
code_tokens: 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 ) ; } } }
docstring: 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
docstring_tokens: Adds options from given array into given container