How to split mysql into 2 columns
Posted: Sat Sep 27, 2008 7:30 am
Greetings ,i am new to php & my tongue is not english , i want to split mysql result into 2 columns , searched the net but did not find any thing help .
I want it like this
--------- ---------
column 1 column 2
--------- ---------
May you help me to understand how to do it ?
Thank you
Code: Select all
<?php
include "config.php";
$sql="SELECT * FROM news ";
$result=mysql_query($sql);
while($rows=mysql_fetch_array($result)){
<a href="readnews.php?id=<? echo $rows['id']; ?>" class="link"><? echo $rows['title']; ?></a>
}--------- ---------
column 1 column 2
--------- ---------
May you help me to understand how to do it ?
Thank you