推入数组元素的文本框


Push into an array elements of textbox

我有一个文本框:

<input type="text" name="dropdiv" id="dropdiv" style="width:605" />

它包含更多的标签(元素,例如:第一个标签,最后一个标签,第二个标签),以及我如何将元素放入数组,然后使用CodeIgniter插入到数据库中?

Thx

尝试使用implode获取字符串

<input type="text" name="tags" value="<php echo implode(",", $tags); ?>" />

和爆炸标签保存数据库:

$tags = array_map('trim', explode(',', $this->input->post('tags')));