richard_heming Posted October 7, 2009 Share Posted October 7, 2009 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>"; } ?> Quote Link to comment Share on other sites More sharing options...
genericnumber1 Posted October 7, 2009 Share Posted October 7, 2009 http://www.phpfreaks.com/forums/index.php/topic,95426.0.html If you "just can't get it right," show us that you've at least attempted to use the information available to you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.