PHP中获取多个复选框的值,一定要给复选框的name属性值加[]吗
我发现PHP程序中,为获取复选框的值,通常都给复选框的name属性加[],例如:
新用户注册
能不能不加,用别的办法取代了,因为我想把ASP的程序转换为PHP的程序,我希望HTML文件不改动最好。
还有,就是说加了这个hobby[],获取到的就会是个数组,不加就不是,这和ASP也不同哦,ASP对于多个name属性值相同的元素,获取到的总是数组。
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