Undefined offset while accessing array element which exists

后端 未结 7 1296
日久生厌
日久生厌 2020-12-15 04:03

I have an array and PHP and when I print it out I can see the values I need to access, but when I try accessing them by their key I am getting a PHP Notice. I printed the ar

7条回答
  •  一向
    一向 (楼主)
    2020-12-15 04:09

    How did you print the array? I would suggest print_r($arrayName);

    Next, you can print individual elements like: echo $arrayName[0];

提交回复
热议问题