list()的问题???100分给你 如果要动态加减,建议使用赋值给数组的办法。比如说$myarray=mysql_fetch_array($result); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 echo "<table border=1 cellspacing=0 cellpadding=1 width='100%'>";while(list($rowID, $rs) = each($result)){ if($rowID == 0){//echo table head echo "<tr bgcolor='".$GLOBALS['TABLE_HEAD_BGCOLOR']."'>"; }else{ echo "<tr>"; } while(list($name, $value) = each($rs)){ $t_value .= "<td> $value </td>"; if($rowID == 0){ $t_header .= "<td> <strong>$name</strong> </td>"; } } $t_value = "<td>".($rowID+1+$GLOBALS['POS'])."</td>$t_value"; if($rowID == 0){ echo "<td><strong>RowID</strong></td>".$t_header."</tr>\n"."<tr>"; echo $t_value; $t_header = ""; }else{ echo $t_value; } $t_value = ""; echo "</tr>\n";}echo "</table>"; 谈谈新手如何学习PHP 为什么静态方法不能操作静态变量? 关于mvc框架 asp连接mysql连接如何写啊 大家写小的BLOG有什么思路吗……我不想为了个BLOG再安装SS+XS……太占地方了……如果自己写要注意什么呢? 高手来讨论:你搞过php最深层次得记的技术是什么技术,另求[如何不用任何函数反转一个字符串] 为什么php调用存储过程返回多个结果集,总要多出一个结果集 请大家帮我一个忙,php中如何调用c程序,以及c内部的函数,谢谢 请问PHP+MYSQL+IIS配置方法? 各位大虾救命啊!!! 页面中链接的自动加入 [[[[ 各位高手,进者有分,高难度问题,分不够在加 ]]]]
echo "<table border=1 cellspacing=0 cellpadding=1 width='100%'>";while(list($rowID, $rs) = each($result)){
if($rowID == 0){//echo table head
echo "<tr bgcolor='".$GLOBALS['TABLE_HEAD_BGCOLOR']."'>";
}else{
echo "<tr>";
}
while(list($name, $value) = each($rs)){
$t_value .= "<td> $value </td>";
if($rowID == 0){
$t_header .= "<td> <strong>$name</strong> </td>";
}
}
$t_value = "<td>".($rowID+1+$GLOBALS['POS'])."</td>$t_value";
if($rowID == 0){
echo "<td><strong>RowID</strong></td>".$t_header."</tr>\n"."<tr>";
echo $t_value;
$t_header = "";
}else{
echo $t_value;
}
$t_value = "";
echo "</tr>\n";
}
echo "</table>";