i'm loading my dropdown
with this and trying set an option:
<div class="form-group">
<label for="areas" class="col-lg-2 control-label">Áreas</label>
<div class="col-lg-3">
<select class="form-control" id="areasCadastradas" name="areas">
<?php
foreach($areas as $row)
{
echo '<option value="'.$row->id.'">'.$row->descricao.'</option>';
}
?>
</select>
<?php echo $record->id_area;
echo set_select('areas', $record->id_area); ?>
</div>
</div>
it is not working... i need load the dropdown and set an option.
edit: the loading it is working.. but i cant set the option
edit 2:
foreach($areas as $row)
{
echo '<option value="'.$row->id.' '.set_select('areas', $record->id, False);.'">'.$row->descricao.'</option>';
}