Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 4 of 4

Thread: Rows

  1. #1
    Join Date
    Apr 2005
    Posts
    4,614
    Tokens
    90

    Latest Awards:

    Default Rows

    I have a rarevalues script and it shows all the rares on a page, using this

    PHP Code:
    while ($row mysql_fetch_array($res)) 

    echo 
    "<td><font face=\"Verdana\" size=\"1\"><p align=\"center\"><img src=\"$row[image]\" alt=\"Value Added on $row[date]\"><br>$row[title]</a> </td>";

    how can i get it so it goes

    VALUE VALUE VALUE VALUE VALUE VALUE

    then

    VALUE VALUE VALUE VALUE VALUE VALUE

    6 items per row

    Thanks

  2. #2
    Join Date
    Aug 2004
    Location
    bristol
    Posts
    3,799
    Tokens
    0

    Latest Awards:

    Default

    PHP Code:
    while ($row mysql_fetch_array($res)) { 
       
    $buffer[] =  "<td><font face=\"Verdana\" size=\"1\"><p align=\"center\"><img src=\"$row[image]\" alt=\"Value Added on $row[date]\"><br>$row[title]</a> </td>";
       if(
    count($buffer)==6) {
          echo 
    '<tr>'.implode(' '$buffer).'</tr>';
          unset(
    $buffer);
       }

    kinda quit.

  3. #3
    Join Date
    Apr 2005
    Posts
    4,614
    Tokens
    90

    Latest Awards:

    Default

    Didn't work
    Gets to 6 then doesnt display any more

    PHP Code:
    while ($row mysql_fetch_array($res)) {  
       
    $buffer[] =  "<td><font face=\"Verdana\" size=\"1\"><p align=\"center\"><img 
    src=\"
    $row[image]\" alt=\"Value Added on $row[date]\"><br>$row[title]</a> </td>"
       if(
    count($buffer)==6) { 
          echo 
    '<tr>'.implode(' '$buffer).'</tr>'
          unset(
    $buffer); 
       } 

    Last edited by Robbie; 15-02-2007 at 03:36 PM.

  4. #4
    Join Date
    Aug 2004
    Location
    bristol
    Posts
    3,799
    Tokens
    0

    Latest Awards:

    Default

    Sorry, your demonstration gave the impression that you were going to have precisely 6 results on each row. To output the remaining data, put this after the while loop.

    PHP Code:
    if(isset($buffer)) echo '<tr>'.implode(' '$buffer).'</tr>'
    kinda quit.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •