@mysql_select_db("student_exam");
$sql=" select * from question where followId='$classid'" ;

$query=@mysql_query($sql,$conn) ;
whule($rs=@mysql_fetch_array( $query )){
print_r($rs);
}

解决方案 »

  1.   

    @mysql_select_db("student_exam");
    $sql=" select * from question where followId='$classid'" ;

    $query=@mysql_query($sql,$conn) ;
    while($rs=@mysql_fetch_array( $query )){
    print_r($rs);
    }
      

  2.   

    <table>
    <?php
    @mysql_select_db("student_exam");
    $sql=" select * from question where followId='$classid'" ;

    $query=@mysql_query($sql,$conn) ;
    while($rs=@mysql_fetch_object( $query )){
    ?>
    <tr><td><?php echo $rs->columnname1;?></td><td><?php echo $rs->columnname2;?></td></tr>
    <?php
    }
    ?>
    </table>
      

  3.   

    把表格标签放入echo里循环即可。如下
    while ($rs = mysql_fetch_array($query)) 
    {
    echo "<tr>
    <td>$id</td>
    <td>$name</td>
    <td>$address</td>
    <td>.....</td>    //变量名就是你数据库的属性名
    </tr>";
    }
    楼上亦是正解。
      

  4.   

    wuyz124(玖头鸟)的解法就是php手册里的标准解法。