How do I put array into columns
Posted
by mathew
on Stack Overflow
See other posts from Stack Overflow
or by mathew
Published on 2010-05-18T03:28:23Z
Indexed on
2010/05/18
3:30 UTC
Read the original article
Hit count: 519
$db = mysql_connect("", "", "") or die("Could not connect.");
mysql_select_db("",$db)or die(mysql_error());
$sql = "SELECT * FROM table where 1";
$pager = new pager($sql,'page',6);
while($row = mysql_fetch_array($pager->result))
{
echo $row['persons']."<br>";
}
mysql_close($db);
above code output :
Mathew Thomas John Stewart Watson Kelvin
What I need is it should split inot multiple columns say:
Mathew Stewart Thomas Watson John Kelvin
HOw do I do this??
© Stack Overflow or respective owner