Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Pulling data from DB with php

Featured Replies

Hi Guys,

 

I have a site that has a database driven area. I have set up my database, entered all of the products and can pull them out onto my page, that is all fine... I have even set up my repeat region without any problems... BUT

 

The client now wants the data to show up in 3 columns rather than one... how would I go about this?

 

At the moment, I just use this:

 

<ul>
 <?php do { ?>
<li><a href="product-detail.php?id=<?php echo $row_ProductList['id']; ?>" class="intext"><?php echo $row_ProductList['title']; ?></a></li>
<?php } while ($row_ProductList = mysql_fetch_assoc($ProductList)); ?>
</ul>

 

But now he wants them to show up in three columns - any ideas on the best way to display this?

 

Cheers :)

  • Author

Sorry - posted in the wrong section.... lol

 

my bad!!

 

Going to re-post in PHP area :)

The easiest we isnt really the best way (using tables). You will have to use a an inner loop that will count three items and the loop if you want to try and do it with divs.

  • Jo 90 locked this topic
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.