21,886
社区成员
发帖
与我相关
我的任务
分享
function mysql_fetch_all($result)
//此函数代码来自PHP手册
{
while($row=mysql_fetch_array($result)) {
$return[] = $row;
}
return $return;
}
$arr1=mysql_fetch_all($result1);
$arr2=mysql_fetch_all($result2);
for ($i=0;$i<count($arr1);$i++)
{
for ($j=0;$j<count($arr1[$i]);$j++)
{
echo "$arr1[$i][$j] ";
if($j==count($arr1[$i])-1) echo '<br />';
}
for ($j=0;$j<count($arr2[$i]);$j++)
{
echo "$arr1[$i][$j] ";
if($j==count($arr2[$i])-1) echo '<br /><br />';
}
}