PHP Parse $_POST Array?

后端 未结 3 1738
傲寒
傲寒 2021-01-14 11:48

A server sends me a $_POST request in the following format:

POST {
  array1
  {
    info1,
    info2,
    info3
  },
  info4
}

So naturally

3条回答
  •  猫巷女王i
    2021-01-14 12:07

    You can simply use a foreach loop on the $_POST

    foreach($_POST["array1"] as $info)
    {
        echo $info;
    }
    

    or you can access them by their index:

    for($i = 0; $i

提交回复
热议问题