loop through $_POST variables with similar names

后端 未结 7 804
南笙
南笙 2020-12-18 09:51

I have several $_POST variables, they are

$_POST[\'item_number1\']
$_POST[\'item_number2\']

and so on

I need to write a loop tha di

7条回答
  •  醉酒成梦
    2020-12-18 09:55

    if you know the number of variables:

    if you don't know the number:

     0) {
        echo $_POST[$key];
      }
    }
    

提交回复
热议问题