Jump to content

How to Displaying data in multiple column


ashoklakhnavi

Recommended Posts

I have written a web page in php, bellow is the code:

<?php mysql_connect('localhost','root','') or die(mysql_error());mysql_select_db("resource_resource") or die(mysql_error());$data = mysql_query("SELECT * FROM categories") or die   (mysql_error()); while($info = mysql_fetch_array( $data )){echo "<p><a href=".$info['catname'].">".$info['catname'] ."</a> ";}echo "</p>";  ?>

This displays data in very long column, Now I want display few data (eg. 50) in a column and rest are in next column and then next.please suggest me the string

reply_small.gif

Link to comment
Share on other sites

or, as you output the data, start it in a div, or suitable tag/container. when you get halfway, based on the total amount of data, close the current element/tag/container/etc, and start a new one for the rest of the data. as for getting them to sit side by side, that just takes a little CSS.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...