Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Tag it jQuery插件表单输入数组存在问题_Php_Jquery_Arrays_Input - Fatal编程技术网

Php Tag it jQuery插件表单输入数组存在问题

Php Tag it jQuery插件表单输入数组存在问题,php,jquery,arrays,input,Php,Jquery,Arrays,Input,我尝试使用jquery插件。 它将入口标记转换为: <input type="hidden" style="display:none;" value="tag1" name="item[tags][]"> <input type="hidden" style="display:none;" value="tag2" name="item[tags][]"> 当表单提交时,它将发送到另一个页面,问题是我希望在循环中使用“item[tags][]”,但使用foreach

我尝试使用jquery插件。 它将入口标记转换为:

<input type="hidden" style="display:none;" value="tag1" name="item[tags][]">
<input type="hidden" style="display:none;" value="tag2" name="item[tags][]">

当表单提交时,它将发送到另一个页面,问题是我希望在循环中使用“item[tags][]”,但使用foreach只会给我错误,因为参数无效。有人能帮我做这个循环吗。谢谢

HTML

<input type="hidden" style="display:none;" value="tag1,tag2" name="tags">
您将看到这两个标记:
tag1
tag2
如果您提交它,您将获得以逗号分隔的标记,例如php in
$\u get[“tags”]

 $('input[name="tags"]').tagit();