Cannot use string offset as an array in php

前端 未结 10 870
南方客
南方客 2020-11-29 06:35

I\'m trying to simulate this error with a sample php code but haven\'t been successful. Any help would be great.

\"Cannot use string offset as an array\"

10条回答
  •  一个人的身影
    2020-11-29 06:45

    When you directly print print_r(($value['']->)); then it shows this fatal error Cannot use string offset as an object in. If you print like this

    $var = $value['#node']->; print_r($var);

    You won't get the error!!

提交回复
热议问题