How to solve PHP error 'Notice: Array to string conversion in…'

后端 未结 5 1480
执念已碎
执念已碎 2020-11-22 12:52

I have a PHP file that tries to echo a $_POST and I get an error, here is the code:

echo \"\";
echo \"\";
for($i=0; $i&l         


        
5条回答
  •  不知归路
    2020-11-22 13:34

    You are using in your HTML. This creates an array in PHP when the form is sent.

    You are using echo $_POST['C']; to echo that array - this will not work, but instead emit that notice and the word "Array".

    Depending on what you did with the rest of the code, you should probably use echo $_POST['C'][0];

提交回复
热议问题