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>"; 请问mysql数据库php如何能select出最新增加的100条数据 按日期搜索的一个问题 位操作符:取反!! 请问php代码在什么情况下会泄漏? PHP新手问个弱弱的问题:如何实现MYSQL的先SELECT后UPDATE操作的互斥 高手,救急! 请帮帮忙-变量问题 为什么只能显示255个字符?(后续) 一句 SQL 插入多条数据,能把所有lastInsertId都取回来吗? 求一个正则的写法 页面中链接的自动加入 [[[[ 各位高手,进者有分,高难度问题,分不够在加 ]]]]
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>";