Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2008
    Posts
    1,003
    Tokens
    0

    Latest Awards:

    Default Help! I need to make a automatic staff list start new rows

    basically, i've created a automatic staff list, so when i add a member to the panel they are added to the list, however, at the minute, they are getting squeezed in until theres no more room, how do i make it so that after 4 people are added it starts a new line?

    This is the PHP

    <?php
    $showit = mysql_query("SELECT * FROM `staff` WHERE `rank` = 'Management' ORDER BY `id`");
    while($row = mysql_fetch_array($showit)){
    echo "<td align='center'>";
    echo "<img src=http://www.habbo.co.uk/habbo-imaging/avatarimage?user=".$row["habboname"]."&action=0&direction=3&head_direction=3&img_forma t=gif&gesture=0&size=s>";
    echo "<br><b>".$row["habboname"]."</b><br><i>".$row["position"]."</i></td>";
    }
    So i need to know, how i could make it miss a line after 4 users have been added and then display 4 more etc.

    Help is greatfully appreciated. +rep

    Tim,.

  2. #2
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    U do $i = 1; then put </tr> if $i = 4; then put $i++ at the end of the while

  3. #3
    Join Date
    Jan 2008
    Posts
    1,003
    Tokens
    0

    Latest Awards:

    Default

    Cheers + REP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •