Echo an $_POST in PHP

后端 未结 3 848
独厮守ぢ
独厮守ぢ 2021-01-05 01:03

How can I print a $_POST?

Example:

echo $_POST[\'data\'];

This returns nothing...

3条回答
  •  甜味超标
    2021-01-05 02:00

    Your code is correct.

    You can use either:

    var_dump($_POST);
    

    or

    print_r($_POST);
    

    to print out the entire POST array for debugging.

提交回复
热议问题