为foreach()提供的参数无效? [英] Invalid argument supplied for foreach()?

查看:105
本文介绍了为foreach()提供的参数无效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个脚本需要将数组中的某些数据与会话数组中特定位置的数据进行比较。第一次运行foreach时没有问题,但第二次失败但数据是相同的。任何人都可以帮助我吗?

I have a script that needs to compare some data in an array to data in sepcific locations in a session array. The first time I run the foreach there''s no problem but the second time it fails but the data is the same. Can anyone help me?

展开 | 选择 | Wrap | 行号

推荐答案

这是因为你的第二个循环使用相同的变量作为第一个。
It''s because your second loop uses the same variable as the first one.


这是否意味着我需要重命名
Does that mean I need to rename


equ?


'太奇怪了。它开始工作得很好,这就是我无法理解的原因。

谢谢。
equ?

That''s wierd. It worked fine to begin with which was why I couldn''t understand it.

Thanks.


这篇关于为foreach()提供的参数无效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆