_options = array(); $this->_values = array(); foreach ($languages['name'] as $index => $name) { if($languages['folder'][$index] == api_get_setting('platformLanguage')) { $this->addOption($name,$languages['folder'][$index],array('selected'=>'selected')); } else { $this->addOption($name,$languages['folder'][$index]); } } } }