开发者

Invalid argument supplied for foreach

开发者 https://www.devze.com 2023-02-16 23:45 出处:网络
I have got this warning, have someone an idea: warning: Invalid argument supplied for foreach() in C:\\xampp\\htdocs\\testplanning\\modules\\planning\\planning.module on line 425.

I have got this warning, have someone an idea:

warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\testplanning\modules\planning\planning.module on line 425.

The code where he the fall is:

foreach($stap3[2] as开发者_如何转开发 $key => $value) {
    $waardeSoortStage[$key] = $value;
}


Probably the variable $stap3[2] is not an array.


I think you wanted to do so:

foreach($stap3 as $key => $value) {
    $waardeSoortStage[$key] = $value;
}

because I think $stap3 is your array,$stab3[2] might only be one member of it.


$stap3[2] is not an array or an empty array.

You can check $stap3[2] with is_array($stap3[2]) If is really array it returns true.

Also you can debug it with var_dump($stap3[2])

0

精彩评论

暂无评论...
验证码 换一张
取 消