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

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

WBOY
WBOYOriginal
2016-06-06 20:41:241396browse

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

回复内容:

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

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

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

用foreach遍历$_POST

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