Help with tables please?

[font=arial]Here’s my code, it’s kinda 70% complete my only problem is the table part. I don’t know how to put or edit, help me please? i want something like this:
[/font]

[code]

My first styled page body { font-family: verdana;", verdana; color: ffcc99; margin: 0; font-size: 11px; padding: -1em; background-color: #000 }

h1 {
font-family: Helvetica, Geneva, Arial,
SunSans-Regular, sans-serif }

<?php

$connect = mysql_connect(“666.666.666.666”,“666”,“666”) or die (“Connection failed!”);
mysql_select_db (“666”) or die (mysql_error());
;
echo “

”;

$tcount = mysql_query(“SELECT * FROM pvpladder order by kills desc limit 10”);
$i = 0;

while ($row = mysql_fetch_row($tcount)) {
echo "


$row[1]- $row[3] - $row[4] - $row[2]
";
$i++;

}

?>[/code]

Use

and for table rows and cells (and not
):
while ($row = mysql_fetch_row($tcount)) {
  echo "<tr>";
  echo "<td>".$row[1]."</td>";
  echo "<td>".$row[3]."</td>";
  echo "<td>".$row[4]."</td>";
  echo "<td>".$row[2]."</td>";
  echo "</tr>";
  $i++;
}

[font=verdana]i forgot i want it to look like this[/font]

You can use css styles to make it look as you wish. Also, before the loop, add table header with column names.

can i ask how to increase the space in the red line?

Try this:

<td width="120" align="center">

width in pixels. And you can review all the available attributes for HTML tables

thank you

Sponsor our Newsletter | Privacy Policy | Terms of Service