Welcome Guest, Not a member yet? Register   Sign In
Problem with dropdown [SOLVED]
#1

[eluser]Brayan[/eluser]
Code:
foreach ($forn->result()as $dados )
                      
        $options[] = array(
                    
                 $dados->ID => $dados->NAME                      
                    
         );
echo form_dropdown('fornec',$options);

this code produce many <optgroup> with values that that start from 0 and each line it increments

why is doing this ?

thanks
#2

[eluser]danmontgomery[/eluser]
Code:
$options = array();
foreach ($forn->result()as $dados ) {
        $options[$dados->ID] = $dados->NAME;
}
echo form_dropdown('fornec',$options);
#3

[eluser]Brayan[/eluser]
LoL

of course :wow:

thank you very much


cheers.




Theme © iAndrew 2016 - Forum software by © MyBB