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 6 of 6
  1. #1
    Join Date
    Jul 2006
    Location
    Athens
    Posts
    842
    Tokens
    0

    Default [PHP/HTML] Tables Help (+REP)

    How to you make a table warp pages.
    My Input is database information and i want it to create a table or coloum for each result found. Easy?
    Well, that was


    How could you manage to do it so if there was too many to fit on one line, it went onto the next, Get what i mean?
    Now thats the hard part

    Thanks


  2. #2
    Join Date
    Jan 2006
    Location
    Cambridge
    Posts
    1,911
    Tokens
    0

    Latest Awards:

    Default

    Err.. What? Sozzeh
    EDTALKING


  3. #3
    Join Date
    Jul 2006
    Location
    Athens
    Posts
    842
    Tokens
    0

    Default

    Say The £ is my table
    Instead of
    ££££££££££££££££££££££££££££££££££££££££££££££££

    Have
    ££££££££££££££££££
    ££££££££££££££££££
    ££££££££££££££££££

    Easier?


  4. #4
    LondonGoons Guest

    Default

    PHP Code:
    <HTML><BODY>

    <
    TABLE WIDTH="80%" 
     
    CELLSPACING=0 CELLPADDING=0 BGCOLOR="#EEEEEE">

    <
    TR><TD>

    Paragraph #1.<BR>

    Paragraph #2.<BR>

    Paragraph #3.<BR>

    </TD></TR>

    </
    TABLE>

    </
    BODY></HTML
    Is that what you meant?

  5. #5
    Join Date
    Dec 2006
    Location
    Kent, UK
    Posts
    627
    Tokens
    138
    Habbo
    Romanity

    Latest Awards:

    Default

    Heres what ya want.... i think...

    PHP Code:
    <?
    echo("<table width='100%'>
    <tr>"
    );
    $i=1;
    $query mysql_query("QUERY") or die(mysql_error());
    while(
    $rows mysql_fetch_array($query)
    {
    echo(
    "<td>CONTENT FROM DATABASE</td>");
    if(
    $i == x// Change x to the number you want on each row
    {
    echo(
    "</tr><tr>");
    $i=0;
    }
    $i++;
    }
    echo(
    "</tr></table>");
    ?>
    That will extract the info from the database, put it in a table.... and put it onto a new row depending on the value of X

    Have a play with it

  6. #6
    Join Date
    Jul 2006
    Location
    Athens
    Posts
    842
    Tokens
    0

    Default

    Edit: It Works, Thanks +rep
    Last edited by Drompo; 18-05-2007 at 07:34 PM.


Posting Permissions

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