View Single Post
  #3 (permalink)  
Old Oct 2nd, 2007, 06:36
Rakuli's Avatar
Rakuli Rakuli is offline
SuperMember

SuperMember
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: List games diplay in columns

Okay, I think I misunderstood what you meant before.

You could try something like

PHP: Select all

<?php


  $games 
get_games("order=name&sort=name&limitstart=0&limitnum="._sp($themecfg['lista'])."&htmlize=true");

  
$num count($games);

  
$i 0;
  foreach (
$games as $game) {


      
     

      
$link get_game_link("id="._sp($game['id']));

     echo 
'<div>';

      echo 
'<a href="'.$link.'" style="width:100px;"></a>';

      if (
$i 4)
        echo 
'</div>';

      
$i++;
This will wrap 4 links at a time in a div, the new div will obviosuly start on a new line. By making all the links the same width, they will line up like columns.

Cheers,

Last edited by Rakuli; Oct 2nd, 2007 at 06:41. Reason: typo correction.