Home >Backend Development >PHP Tutorial >有关checkbox的有关问题

有关checkbox的有关问题

WBOY
WBOYOriginal
2016-06-13 10:29:07830browse

有关checkbox的问题?
这样定义两个复选框:


怎样取得它们的value值?
我试过这种取法:$_POST['xuanze'][0],$_POST['xuanze'][1],结果失败了,请问谁知道怎么取得?

------解决方案--------------------
在此我非常抱歉,那段代码没测试,我有测试了一下,是这样:

PHP code
<?phpif (isset($_POST)){    print_r($_POST);    #Array ( [id] => Array ( [0] => 3 [1] => 4 ) [del] => 删除 )#也就是说,name中[]会被解析为0,1……#$_POST['id'][0] => 3}?>

的记录

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn