I'm trying to add a set of dummy options to my dropdown to make some jQuery code work. The problem is that although the loop is working I can't figure ou开发者_Go百科t how to set the drop down to loop though and get all 50 dummy values it just returns the first one. I know this is like beginner PHP stuff but loops and arrays seem to always be confusing to me.
$dummy_value = array('UNASSIGNED');
while ($i <= 50)
{
$dummy_value = "''=> 'null'";
$i++;
}
echo form_dropdown('employee_manager',array('null' => 'Please Select A Manager', $dummy_value)); ?>
Ideally I want the form_dropdown
to contain 50 of ''=> null
vaules. In theory we could add the whole array including the first option to the loop or a variable (I think)
$dummy_value [] = "''=> 'null'";
精彩评论