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
https://forums.phpfreaks.com/topic/13845-a-layout-issue-from-a-mysql-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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