title: Preset currency value on select codeigniter
body: <p>I have a select box with currency 1 and 2, currency 1 is for Euro. I want my select box to preset the value 1 which is euro.</p>
  
  <p>I am using controller to get the currency information like this.</p>
  
  <pre><code>$data =  array(
              'sexList' =&gt; $this-&gt;localization-&gt;getTextParamValues(null, 'user', 'Sex'),
              'countryList' =&gt; $this-&gt;localization-&gt;getCountryList(),
              'currencyList' =&gt; $this-&gt;localization-&gt;getCurrencyList(),
              'languageList' =&gt; $this-&gt;localization-&gt;getLanguageList(),
              'user' =&gt; $userExist,
              'userinfo' =&gt; $this-&gt;user_profile-&gt;getUserInfo(),
              'Currency' =&gt; $this-&gt;localization-&gt;getCompanyCurrency()
          );
  
          $this-&gt;load-&gt;view('header', $this-&gt;history-&gt;getPreviousPageInArray());
          $this-&gt;load-&gt;view('borrow_registerpage_view',$data);
  </code></pre>
  
  <p>The currency is pushing the value one to the data array, but in the html file it doesnt preset automatically. Dont know what is wrong.</p>
  
  <p>Here is the HTML code, I need to preset the value 1 in this table so it selects 1 normally which is EURO.</p>
  
  <pre><code>&lt;?php   
    echo '&lt;select name="currency_select" id="my_profile_select_currency" class="form-control country_style"&gt;';    
      if(!($user['Currency'] &gt; 0)){
         echo '&lt;option value="0"&gt;'.lang("myprofile_pinfo_no_currency_set").'&lt;/option&gt;';
            foreach ($currencyList as $currency){
               echo '&lt;option value="' . $currency-&gt;ID. '"&gt;' . $currency-&gt;Name . '&lt;/option&gt;';
                 }
            }else{
                                foreach ($currencyList as $currency){
                                    echo '&lt;option value="' . $currency-&gt;ID. '"';
                                    if($currency-&gt;ID==$user['Currency']){
                                        echo 'selected';
                                    }
                                    echo '&gt;' . $currency-&gt;Name .'';       
                                echo  '&lt;/option&gt;';            
                                }
                        }         
                        echo '&lt;/select&gt;'  
                        ?&gt;
  </code></pre>