rscott7706 Posted March 7, 2006 Share Posted March 7, 2006 Hello, as in many cases, brand new to MYSQL and PHP.I have a 119 record MYSQL that I am querying through PHP. I would like to display as three columns.Here is some of the code, is there a way to use this code then disply as three equal columns?<?php$db = mysql_connect("localhost", " ", " ");mysql_select_db(" ");$query = "SELECT * FROM members";$result = mysql_query($query) or die(mysql_error());while($row = mysql_fetch_array($result)){echo $row['Company_Name'];echo "<br />";echo "Contact: ";echo $row['First_Name'] . " ". $row['Last_Name'];echo "<br />";echo $row['Mailing_Address'];echo "<br />";echo $row['Mailing_City']. ", ". $row['Mailing_State']. " ". $row['Mailing_Zip_Code'];echo "<br />";echo "Phone: ";echo $row['Phone_Number'];echo "<br />";echo "Fax: ";echo $row['Fax_Number'];echo "<br />";echo "<br />";}?>Thanks in advance!Ron Scott Quote Link to comment https://forums.phpfreaks.com/topic/4377-creating-columns-using-php/ Share on other sites More sharing options...
thevictorchen Posted September 23, 2008 Share Posted September 23, 2008 Hey Ron, it appears you have around 5 items (Company Name, Name, Mailing Address, Phone Number, Fax Number). Do each of these items deserve their own column? Basically, I am asking what the column header names should be? Quote Link to comment https://forums.phpfreaks.com/topic/4377-creating-columns-using-php/#findComment-648403 Share on other sites More sharing options...
.josh Posted September 23, 2008 Share Posted September 23, 2008 http://www.phpfreaks.com/forums/index.php/topic,95426.0.html Quote Link to comment https://forums.phpfreaks.com/topic/4377-creating-columns-using-php/#findComment-648407 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.