Jump to content

Tony-KM

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

About Tony-KM

  • Birthday 04/14/1986

Contact Methods

  • Website URL
    http://www.ffinsight.com

Profile Information

  • Gender
    Male
  • Location
    England

Tony-KM's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you so much! I'd kiss you if that weren't weird. I should have thought of something like that, I had to do something almost identical for a Flash project I did in university this year >.< Thanks again you've saved me much killing of people.
  2. Ok I've checked on both the site and forum here for help on this but since I don't know exactly what the help is I'm looking for, I didn't really know where to look for it. Ok, here's the low-down, I've been working on an image database of sorts (to be used for free avatars, signatures, and later a simple screenshot gallery) using SQL for my site. Now, that works fine, but I'm getting the script to insert each image (avatars at the moment) into seperate cells in the table, and it causes the page to stretch nastilly once there's more than 5 cells side by side. What I need is a way to tell the script to automatically add "</tr><tr>" after every 5th entry into the table. Here's the script as it looks (so that it makes more sense, and yes I know the code is slightly messy, but meh, I'm not bothered about coding aesthetics at the moment): [code]echo " <table width=\"100%\" cellpadding=\"0\" cellspacing=\"1\"> <tr>"; while ($row=mysql_fetch_array($result)) { $id=$row["id"]; $name=$row["name"]; $artist=$row["artist"]; $artisturl=$row["artisturl"]; $series=$row["series"]; $category=$row["category"]; $date=$row["date"]; $previewimage=$row["previewimage"]; $download=$row["download"]; $viewhtml=$row["viewhtml"]; echo " <td width=\"100px\"><center><img src=\"$previewimage\" border=\"1px solid #000000\"><br>by $artist</center></td>"; } echo " </tr></table> <br><br> <center>";[/code] And here's the code in action - http://www.ffinsight.com/index.php?icon=10 Now I know I could switch the $row variable to be 5, but that means I could only display 5 avatars per page, and I want to display 25, and the page only looks right if I have 5 avatars lined next to each other. Any help on this would be greatly appreciated.
×
×
  • 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.