<?php
echo form_dropdown('user_smoking', $this->session->userdata["data"]
['smoke'], '', 'id="user_smoking" class="form-control border border-
danger
rounded-0"'); ?>
</div>
<div class="form-group">
<label for="drink"><b>Drink:</b></label>
<?php
`echo form_dropdown('user_drinking', $this->session-
>userdata["data"]`['drink'], '', 'id="user_drinking" class="form-control
border border-danger rounded-0"'); ?>
</div>
<div class="form-group">
<label for="occupation"><b>Occupation:</b></label>
<?php
echo form_dropdown('user_occupation', $this->session->userdata["data"]
['occupation'], '', 'id="user_occupation" class="form-control border
border-danger rounded-0"'); ?>
</div>
<button type="submit" class="btn btn-danger btn-red btn-lg
`rounded-0">Save Changes</button>`
在代码上方,我使用了动态下拉列表,该下拉列表会产生动态值,但在动态值之前,我想添加一个空值,因此如何添加------这样的空值,请告诉我。 谢谢。