hello.
the below code puts the most recent row added into a list.
im trying to put the list in to 2 colums
how can i do that?
Code: Select all
<?php
$shop = array();
$query = "SELECT * FROM form1 WHERE id='$user_id'";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result)){
$shop[] = $row['Fname'];
$shop[] = $row['Sname'];
$shop[] = $row['description'];
}
foreach($shop as $key => $details) {
$key++;
echo $key . ": ". $details . "<br/>";
}
?>
1: ricky
2: spires
3: my description
I WOULD LIKE THIS TO BE ECHOED :
result 1 ----------------result 2
result 3 ----------------result 4
result 5 ----------------result 6
result 7 ----------------result 8
result 9 ----------------result 10
thanks
rick