I have done a small web site with php and mysql. like following i need to put the record set and break the <tr> but some how its not working. can you guys please help me.

------------------------------------
| Data 01 | Data 02 | Data 03 |
-----------------------------------|
| Data 01 | Data 02 | Data 03 |
-----------------------------------|

Like this.

Hi.

Please, post some code.

Are you needing something like this?

$sql = "SELECT * FROM myTable";
  if ($rs = mysql_query($sql, $dbConn)){
      echo "<table>";
        for ($i=0; $i<mysql_num_fields($rs); $i++) {
            echo "<th>".mysql_field_name($rs,$i)."</th>";
          }
        while ($row = mysql_fetch_row($rs)) {
            echo "<tr>";
            for ($j=0; $j<mysql_num_fields($rs); $j++) {
                    echo "<td>".$row[$j]."</td>";
            }
        echo "</tr>";
      }
    echo "</table>";
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.