mysql 有如下数据:----   ---------
  id   classname
----   ---------
  1        ASP
  2        JSP
  3        PHP 
  .         .
  .         .
  n         n哦,显示格式如问题所示。

解决方案 »

  1.   

    while (!rs.eof)
       for i=1 to 3
          response.write "<tr>"
          for j=1 to 3
              response.write "<td>"&rs("name")&"</td>"
          next
          response.write "</tr>"
       next
    wend
      

  2.   

    $data = array(1,2,3,4,5,6,7,8,9);
    $tmp = array();
    $rowcount = 3;
    foreach($data as $key=>$value){
        $tmp[$key%$rowcount][] = $value;
    }
    生成的数组就是含有$rowcount列的n行数据。$data是你从数据库中取到的数据。
      

  3.   

    $rs = mysql_query("select ....");
    echo "<table>";
    $col = N;
    $row
      

  4.   

    http://www.interakt.ro/demo/MXLooper/images.php 类似这样的自么实现?