Jump to content

Change number of Columns


richard_heming

Recommended Posts

I know that this has been discussed several times but I cant seem to make it right.  I have a script that displays results in one column.  I would like the results to display in 2, maybe 3 columns.  Can someone please show me how to do this?  Here is my one column code:

 

<?php

mysql_connect("localhost", "user", "password") or die(mysql_error());

mysql_select_db("directory") or die(mysql_error());

 

$query  =  "SELECT * FROM `membership` WHERE `Last Name` = '$lastname'";

$result = mysql_query($query);

 

while($row = mysql_fetch_assoc($result))

{

    echo " Name : {$row['First Name']} " .

        " {$row['Last Name']} <br>" .

          "Spouse : {$row['Spouse']} <br>" .

        "Address : {$row['Street Address']}<br>" .

        "City/State/Zip : {$row['City/State']} " .

        " {$row['Zipcode']} <br>" .

        "Home Phone : {$row['Home Phone']} <br>" .

        "Alt. Phone : {$row['Alt. Phone']} <br>" .

        "Email Address: {$row['Email Address']} <br>" .

          "Child(ren) : {$row['Children']} <br><br><br>";

}

 

 

 

?>

 

Link to comment
https://forums.phpfreaks.com/topic/176790-change-number-of-columns/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.