View Single Post
  #4 (permalink)  
Old Oct 2nd, 2007, 11:31
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

PHP: Select all

  foreach ($games as $game) { 

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

        if (
$i === 0)
        {
              echo 
'<div style="width: 118px;float: left;">';
          }
      

      echo 
'<div><a href="' $link.'">'.$game['name'].'</a><br /></div>';
       
       
$i++;
      if (
$i == 20) {
      echo 
'</div>';
          
$i=0;
       }

     
      
// - ".$game['rating']."
  

This code fixes it so that there will be 20 links per column.