I have been struggling with printing colums. For example i want to pull out results from database and want to display those data in 3 colums by splitting it. how to do it in a easy way.
The simplest way to do this would be to output the database contents into a HTML table. $query = mysql_query("SELECT something FROM somewhere"); ?> <table> <th> Col 1 </th> <th> Col 2 </th> <th> Col 3 </th> <?php while($r = mysql_fetch_array($query)) { ?> <tr> <td> <?php echo $r['col1data']; ?> </td> <td> <?php echo $r['col2data']; ?> </td> <td> <?php echo $r['col3data']; ?> </td> </tr> <?php } ?> </table> That should do the job.