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
  1. #1
    Join Date
    Mar 2009
    Location
    Western Australia
    Posts
    386
    Tokens
    0

    Default [PHP] Display Across Page

    Ok I'm getting urls from my database and displaying them on the page but the only way I know how is across or down and I was wondering if anybody knew how to display the images like


    1 2
    3 4
    instead of
    1234 or
    1
    2
    3
    4

    here's my code:
    PHP Code:
    // Display Data
              
    $get mysql_query("SELECT * FROM pictures LIMIT $start$per_page");
              while (
    $row mysql_fetch_assoc($get))
              {
               
    // Get Data
               
    $url $row['url'];
               
    $name $row['name'];
                 echo 
    "<img src='$url' width='100px' height='100px' alt='$name' border='1'><br />";
              } 
    Note, Connecting data wasn't added in.

  2. #2
    Join Date
    Sep 2009
    Location
    Hull
    Posts
    827
    Tokens
    0

    Latest Awards:

    Default

    Create a div with a set width so that the images move to the bottom after they reach the edge?

    Lew.
    Im not here to be loved, I love to be hated :-}


  3. #3
    Join Date
    Mar 2009
    Location
    Western Australia
    Posts
    386
    Tokens
    0

    Default

    Oh.. Sounds about right, I'll give this a try, Would it be like this, and this is roughly off the top off my head, html only too.


    HTML Code:
    <div id='example' style='width:250px;'>
    <img scr='lol.png' width='100px' height='100px'>
    </div>

  4. #4
    Join Date
    Sep 2009
    Location
    Hull
    Posts
    827
    Tokens
    0

    Latest Awards:

    Default

    Yeah, that sounds about right

    Lew.
    Im not here to be loved, I love to be hated :-}


Posting Permissions

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