Warning: Invalid argument supplied for foreach()
程序员文章站
2022-06-13 20:38:23
...
你是不是在用foreach 时出现这样的错误呢?Warning: Invalid argument supplied for foreach()
你是不是在用foreach 时出现这样的错误呢?Warning: Invalid argument supplied for foreach()
语法:foreach(array as value => value2)
实例:
$Array =array(1,2,3,4);
$Temp = false;
foreach( $Array as $out =>$temp){
echo $temp;
}
这样就会输出1234
下面我们再来看一个foreach的实例吧。
foreach( $Trray as $out =>$temp){
echo $temp;
}
会出错:
Warning: Invalid argument supplied for foreach() in E:wwwrootshinywwwrootincludesmodulesshippingems.php on line 92
哈哈,你应该知道为什么会出现上面的错误了吧。
www.111cn.cn/phper/php.html原创转载注明
推荐阅读
-
php下foreach提示Warning:Invalid argument supplied for foreach()的解决方法
-
Warning: Invalid argument supplied for foreach()
-
php下foreach提示Warning:Invalid argument supplied for foreach()
-
php下foreach提示Warning:Invalid argument supplied for foreach()
-
Warning: Invalid argument supplied for foreach()_PHP教程
-
为何总是Warning: mysql_fetch_object(): supplied argument is not a valid MySQL resul
-
解决Invalid argument supplied for foreach()报错
-
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result res,该怎么解决
-
php出现Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result解决办法
-
php下foreach提示Warning:Invalid argument supplied for foreach()的解决方法