gpt4 book ai didi

php - 如何从 $_POST 获取键值?

转载 作者:IT王子 更新时间:2023-10-29 00:09:49 24 4
gpt4 key购买 nike

echo $_POST["name"]; //returns the value a user typed into the "name" field

我也希望能够返回 key 的文本。在此示例中,我想返回文本“名称”。我可以这样做吗?

最佳答案

$_POST 只是一个普通的关联数组,因此您也可以像这样循环整个内容:

foreach($_POST as $key=>$value)
{
echo "$key=$value";
}

关于php - 如何从 $_POST 获取键值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/183914/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com