Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: PHP Columns

  1. #1
    New to the CF scene
    Join Date
    Mar 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP Columns

    I am trying to find a way to have my data displayed in 4 colums wide.. Can someone help?

    <?php

    //connect include
    require ("connect.php");

    //extract data
    $extract = mysql_query ("SELECT * FROM people ORDER BY id ASC");
    $numrows = mysql_num_rows ($extract);

    while ($row = mysql_fetch_assoc ($extract))
    {

    $id = $row['id'];
    $firstname = $row['firstname'];
    $lastname = $row['lastname'];
    $dob = $row['dob'];
    $gender = $row['gender'];

    if ($gender=="F")
    $gender = "Female";
    else
    $gender = "Male";


    echo "$firstname $lastname<br> was born on $dob<br> and is $gender<br /><br />";


    }


    ?>

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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