【发布时间】:2010-03-12 17:41:19
【问题描述】:
我有一个存储在数组中的mysql查询结果资源序列。
E.G 数组([0] => 资源 [1] => 资源 ...ect);
此代码检索数组中的第一个资源:
$third_count = "0";
while ($user_result = mysql_fetch_array($user[$third_count])) {
print_r($user_result);
}
$third_count = $third_count +1;
我只是试图找到一个循环遍历数组的 if 语句。
类似于:while ($third_count =
其中 $second count 是数组中元素的数量。
感谢指点!
【问题讨论】:
-
啊,我自己修好了。弄错了 =
标签: php loops while-loop