表单下拉列表需要codeigniter

时间:2016-10-10 05:39:32

标签: javascript codeigniter

我有这样的代码



<div class="col-sm-9">
 <?php $attributes = 'class = "form-control" id = "actype"';
echo form_dropdown('actype',$actype,set_value('actype',$detail[0]>activity_type),$attributes);?>
</div>
&#13;
&#13;
&#13;

我的模特:

&#13;
&#13;
function get_actype()
	{
		$type_id = array('-SELECT-');
		$type_name = array('-SELECT-');

		for ($i = 0; $i < count($result); $i++)
		{
			array_push($type_id, $result[$i]->activity_type_id);
			array_push($type_name, $result[$i]->activity_type_name);
		}
		return $actype_result = array_combine($type_id, $type_name);

	}
&#13;
&#13;
&#13;

如何创建所需的验证下拉列表

0 个答案:

没有答案