I try to create loop for select box for select time start 8.00 and increasing it continusly for this matter i found solution from creating a loop for time incremented by 15 minutes but i put it into my code under array it shows only one time but i use var_dump($timeinoption) it shows correctly as
array (size=1)
'8 . 0' => string '8 . 0' (length=5)
array (size=1)
'8 . 15' => string '8 . 15' (length=6)
array (size=1)
'8 . 30' => string '8 . 30' (length=6)
array (size=1)
'8 . 45' => string '8 . 45' (length=6)
array (size=1)
'9 . 0' => string '9 . 0' (length=5
but codeignaiter select box not work;
form_dropdown('timein',$timeinoption,'8.30');
it shows only one time on select box
echo form_label('Time Start','timestart');
for ($i = 8; $i <= 17; $i++)
{
for ($j = 0; $j <= 45; $j+=15)
{
//inside the inner loop
$opti= $i.' . '. $j;
$timeinoption=array($opti=>$opti) ;
}
//inside the outer loop
}
echo form_dropdown('timein',$timeinoption,'8.30');
?>