Welcome Guest, Not a member yet? Register   Sign In
Select box help
#1

[eluser]oldrock[/eluser]
HI..

How the below code can be achieved in code igniter.

<select name='somename'>
&lt;?php
for($i=0;$i<100;$i++)
echo "<option value=$i >$i</option>";
?&gt;
</select>

Thanks in advance
#2

[eluser]SPeed_FANat1c[/eluser]
with

$this->input->post('somename');

Smile
#3

[eluser]oldrock[/eluser]
hi Thanks for your Interest..,

i hope that you misunderstood the question ,

i need help to implemet the select box that displays the numbers from 1 to 100 as options using form_dropdown();

thanks in advance
#4

[eluser]SPeed_FANat1c[/eluser]
I didn't test you code, but my is similar:

Code:
$options = array();
        for($i = 1;$i<=$count+1;$i++)
        {
            $options[$i] = $i;
        }
        
        
        
        echo form_dropdown('position', $options).br();

is this what you need?
#5

[eluser]neo.cepot[/eluser]
Try this code...
Hope it helps...

Code:
&lt;?php  
    for($i=1; $i<=100; $i++){
      $arr_number[$i]=$i;
    }
    echo form_dropdown('listnumber',$arr_number,1);
  ?&gt;
#6

[eluser]oldrock[/eluser]
ya tats done the trick ,

thanks for your help




Theme © iAndrew 2016 - Forum software by © MyBB