Jump to content

a layout issue from a mysql query


juanc

Recommended Posts

Hi

I’m trying to display some thumbnail images I have via a mysql query.

The problem I have though is in trying to achieve a certain layout.

I want a row of three individual items then another three underneath and so on. 

basically a replica of this…… http://www.templatemonster.com/category.php?type=0&tid=+-+Any+-&search_words=+-+Any+-&from_=&to=&cat=57&style=0&author=0&x=24&y=8

What I’ve always been used to in the past is outputting one item per row, where as this would be three database rows in one html table row. 

is there possibly abit of code that could put in a line break each time three items are displayed.

while($row = mysql_fetch_array($query))
  {
        // abit of code here to put in a line break after 3 items
      echo row[‘item’];
  }

Or perhaps someone could suggest another way.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.