Jump to content

tommy445

Members
  • Posts

    31
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

tommy445's Achievements

Member

Member (2/5)

0

Reputation

  1. Hello, I have a working script pulling data from mysql and into a table with alternate color rows using php. As you can see I am able to adjust size to the table headers how ever I am at a lost in reducing the size to the row data. This is a tricky one, any ideas? $numofrows = @mysql_num_rows($result); print ' <table width="650" border="0" cellpadding="0" cellspacing="0"> '; print ' <TR> <td width="25%"> <font size="2">No.</font></td> <td width="25%"><font size="2">Name</font></td> <td width="50%"><font size="2">Last Name</font></td> </TR> '; for($i = 0; $i < $numofrows; $i++) { $row = @mysql_fetch_array($result); if($i % 2) { print ' <TR bgcolor="#CCCCCC"> '; } else { print ' <TR bgcolor="#EAEAEA">'; } print " <td>$i</td> <td>" . $row['client_first_name']."</td> <td>" . $row['client_last_name']."</td> "; print "</TR> "; } print " </table> "; ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.