How do I make a new column...

Discussion in 'PHP' started by bstunt, Oct 24, 2008.

  1. #1
    I'm currently tweaking template code that I have for my game site, and I'm trying show the list of my games, so far, I did it... but the thing is, when I create a table and show the game list (100 games), it only shows up in one column...now is there anyway I can make the code show 10 games in one column, then automatically create another column to show the next 10 games (so, 10column x 10rows total of 100 games) ....

    sory for bad explanation, im not really a coder, but If you have any questions, just reply...

    heres the code...
     
    bstunt, Oct 24, 2008 IP
  2. bstunt

    bstunt Well-Known Member

    Messages:
    385
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    110
    #2
    bstunt, Oct 25, 2008 IP
  3. Kyosys

    Kyosys Peon

    Messages:
    226
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #3
    $i = 1;
    foreach ($games as $game) {

    $link = get_game_link("id="._sp($game['id']));
    echo "<tr><a href='".$link."' class='contenttext'>".$game['name']."</a>"."</tr>";
    if(!$i%10) echo "do stuff here";
    $i++;

    }
     
    Kyosys, Oct 25, 2008 IP
  4. bstunt

    bstunt Well-Known Member

    Messages:
    385
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    110
    #4
    still displaying 100 list in one row
     
    bstunt, Oct 25, 2008 IP
  5. Kyosys

    Kyosys Peon

    Messages:
    226
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #5
    That is just an example. It prints out do stuff here on every 10th game
     
    Kyosys, Oct 25, 2008 IP