如何从 $_POST 中获取键值?
echo $_POST["name"]; //returns the value a user typed into the "name" field
我希望能够返回密钥的文本。在此示例中,我想返回文本“name”。我可以这样做吗?
echo $_POST["name"]; //returns the value a user typed into the "name" field
我希望能够返回密钥的文本。在此示例中,我想返回文本“name”。我可以这样做吗?
$_POST 只是一个普通的关联数组,所以你也可以像这样循环整个事情:
foreach($_POST as $key=>$value)
{
echo "$key=$value";
}