Home > Backend Development > PHP Tutorial > php form怎么接收含有固定参数的不定参数

php form怎么接收含有固定参数的不定参数

WBOY
Release: 2016-06-06 20:41:24
Original
1397 people have browsed it

在接收不定参数中,有两个字段譬如page,limit这两个字段我想接收的,但是其它字段可以不限,我改怎么写这个接收form的函数?

回复内容:

在接收不定参数中,有两个字段譬如page,limit这两个字段我想接收的,但是其它字段可以不限,我改怎么写这个接收form的函数?

isset()判断是否存在其他字段

if(isset($_POST['page']) && $_POST['page'])
{
# code
}

用foreach遍历$_POST

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template