Hi
I had to echo a table from a database in a html column (td) but the problem is the width of that column is increasing when show that para.... Please help me...
Thanks
Rajeesh

Recommended Answers

All 3 Replies

Urgently help me please.....

Would you care to be a little more specific? The width of what column is increasing? And why is this a problem? HTML tables will fit to the largest width by default.

Hi,
What exactly you want? Just display all the fields of table in the html table? You wont bother about the width rather you should give border="0" in the table. for eg:- if you have two fields as Name,Age in "person" table, then

// made database connections in php
  //$sql=mysql_query("select * from person");
   <form>
   <table border="0">
    <tr>
    <td>Name</td><td>Age</td>
     <?
     while($row=mysql_fetch_array($sql))
     {
     ?>
      <td> <? echo $row['Name'];?></td>
      <td><?echo $row['Age'];?></td>
     <?
         }
     ?>
    </table>
   </form>

It automatically displays all Name and Age in person.

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.