<table width="760" height="19" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="253" height="19"> </td> <td width="253"> </td> <td width="254"><? include("gera.lista.amigos.pequena.php"); ?></td> </tr> </table>
Sendo que onde é feito o include eu quero que a lista de amigos fique assim:
|1|-|2|-|3|
|4|-|5|-|6|
Mas ao invés disso tá saindo assim:
|1|-|2|-|3|-|4|
|5|-|6|
E queria 3 amigos em cima e 3 embaixo.
Eu me espelhei no script Yougurt que está assim:
function draw_small_friend_list($rs) { ?> <table width="96%" cellspacing=0 cellpadding=0> <tr><td align="center"> <? draw_frame_top("Friends</b> (<a href=\"friends.php?id=". $_GET['id'] ."\">view all friends</a>)<b>"); if(mysql_num_rows($rs)<=0) print("this user has no friends"); ?> <table width="100%"> <? $count=0; while($row = mysql_fetch_array($rs)) { ?> <? if ($count==0) print("<tr>"); ?> <td align="center" width="25%"> <a href="profile.php?id=<? print($row['friend']); ?>"><? draw_user_small_picture($row['friend']) ?><br> <? print($row['first_name'] . " " . $row['last_name']); ?></a><br> </td> <? if ($count==3) print("</tr>"); ?> <? $count++; if ($count>=4) $count=0; } if ($count!=0) print("</tr>"); ?> </table> <? draw_frame_bottom(); ?> </td></tr> </table> <? }
Sei que isso tem a ver com a tabela, mas o que devo colocar? ou tirar?
Muito obrigado...