What script for Family tree

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Rent a Cop
Forum Newbie
Posts: 1
Joined: Tue Mar 25, 2003 11:26 am

What script for Family tree

Post by Rent a Cop »

I am trying to make a list like a family tree for a bunch of friend involved in a online game.

I've been playing all day with PHP trying to display my SQL database of the names and thier commader links in a HTML table format but am having great troubles due to the structure that HTML uses for tables. ( mainly because I wish to go from left to right rather than top to bottom.)

still a bit of a novice at this so be gentle!

thanx :?
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

layers?
User avatar
Zoram
Forum Contributor
Posts: 166
Joined: Sun Aug 18, 2002 3:28 pm
Location: Utah
Contact:

Post by Zoram »

an idea :

try something like this...

Code: Select all

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr valign="middle"> 
    <td width="25%" rowspan="8">Name 1</td>
    <td width="25%" rowspan="4">Name 2</td>
    <td width="25%" rowspan="2">Name 4</td>
    <td width="25%">Name 8</td>
  </tr>
  <tr valign="middle"> 
    <td>Name 9</td>
  </tr>
  <tr valign="middle"> 
    <td rowspan="2">Name 5</td>
    <td>Name 10</td>
  </tr>
  <tr valign="middle"> 
    <td>Name 11</td>
  </tr>
  <tr valign="middle"> 
    <td rowspan="4"><p>Name 3</p>
      </td>
    <td rowspan="2">Name 6</td>
    <td>Name 12</td>
  </tr>
  <tr valign="middle"> 
    <td>Name13</td>
  </tr>
  <tr valign="middle"> 
    <td rowspan="2">Name 7</td>
    <td>Name 14</td>
  </tr>
  <tr valign="middle"> 
    <td>Name 15</td>
  </tr>
</table>
the idea might work... :wink: I think that you could come up with some fancy loops to dynamically create the table... have fun with that!
Post Reply