Hi there,
I am trying to display the contects of one of my mysql tables on one page but in two columns, but for some reason just cannot get my head around the logic of the php coding. The code I have so far that works is as below, what do I need to add/change to get it to display in two columns.
<table>
[code=php]
<?php
$conn = mysql_connect("localhost","root","password")
or die(mysql_error());
mysql_select_db("xxx",$conn) or die(mysql_error());
$sql = "SELECT * from table_name";
$result = mysql_query($sql, $conn) or die(mysql_error());
while ($newArray = mysql_fetch_array($result))
{
$id = $newArray['id'];
$name = $newArray['name'];
$thumb_img = $newArray['image'];
echo "<tr><td>$name<button name=\"Choose\" type=\"button\" value=\"$id - $name\">Select</button><br><image src=\"http://www.way/to/image/path/$image\" width=\"100px\" height=\"100px\"></td><tr>";
}
?>
</table>
[/CODE]
Thanks for your help in advanced.