Freedom-n-Democrazy Posted September 15, 2011 Share Posted September 15, 2011 I am wanting to make a product list page with PHP. At the moment I using this code: $query = "select * from products where category = 'Belts'"; $result = mysql_query($query); while($row=mysql_fetch_assoc($result)) { echo $row['name']; } The result is something like this: http://i51.tinypic.com/2w56ljq.png What I want is for them to be aligned like this: http://i53.tinypic.com/w811tz.png Eventually, I am also going to include an image with each product. How would I go about alignment? With CSS or PHP? Quote Link to comment https://forums.phpfreaks.com/topic/247197-how-should-i-approach-this/ Share on other sites More sharing options...
Sanjib Sinha Posted September 15, 2011 Share Posted September 15, 2011 For alignment you need to use CSS and for the product display either you may use CSS division or table. Quote Link to comment https://forums.phpfreaks.com/topic/247197-how-should-i-approach-this/#findComment-1269582 Share on other sites More sharing options...
AyKay47 Posted September 15, 2011 Share Posted September 15, 2011 you will most likely want to align them using an html table and css.. EDIT: as stated above.. Quote Link to comment https://forums.phpfreaks.com/topic/247197-how-should-i-approach-this/#findComment-1269583 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.