How can I get the pictures in the following code to display in a horizontal table....NOT vertical?
<?php
require('../includes/config.php');
$db_addr = 'xxx'; // address of MySQL server.
$db_user = 'xxx'; // Username to access server.
$db_pass = 'xxx'; // Password access server.
$db_name = 'xxx'; // Name of database to connect to.
$connect = @mysql_connect("$db_addr", "$db_user", "$db_pass");
$page = $_GET['page'];
$limit = $_GET['limit'];
if (!($connect)) // If no connect, error and exit().
{
echo("<p>Unable to connect to the database server.</p>");
exit();
}
if (!(@mysql_select_db($db_name))) // If can't connect to database, error and exit().
{
echo("<p>Unable to locate the $db_name database.</p>");
exit();
}
if (!($limit)){
$limit = 10;} // Default results per-page.
if ( !$page or $page < 0 ) { $page = 0; } // Default page value.
$numresults = mysql_query("SELECT town, type,list_price, bedrooms, baths, rooms, Id ,featured_listing,remark1
FROM residential
WHERE featured_listing = 'yes'
ORDER BY list_price DESC
")
; // the query.
$numrows = mysql_num_rows($numresults); // Number of rows returned from above query.
if ($numrows == 0){
# print "<br>selecttownstring: $selecttownstring";
echo("No results found matching your query"); // modify the "Not Found" error for your needs.
exit();}
$pages = intval($numrows/$limit); // Number of results pages.
// $pages now contains int of pages, unless there is a remainder from division.
if ($numrows % $limit) {
$pages++;} // has remainder so add one page
$current = intval($page/$limit) + 1; // Current page number.
if (($pages < 1)) {
$total = 1;} // If $pages is less than one, total pages is 1.
else {
$total = $pages;} // Else total pages is $pages value.
$first = $page + 1; // The first result.
if (!((($page + $limit) / $limit) >= $pages) && $pages != 1) {
$last = $page + $limit;} //If not last results page, last result equals $page plus $limit.
else{
$last = $numrows;} // If last results page, last result equals total number of results.
//escape from PHP mode.
?>
<link href="../includes/style.css" rel="stylesheet" type="text/css">
<?
$results = mysql_query("SELECT *
FROM residential
WHERE featured_listing = 'yes'
ORDER BY list_price DESC
LIMIT $page, $limit");
for($i = 0; $i < $limit; $i++){
for ($count = 1; $row = mysql_fetch_assoc ($results);++$count)
{
if ($count & 1) {
$color = "$row1color";
$font = "white";
}
else {
$color = "$row2color";
$font = "$row2fontcolor";
}
$Id_photo = $row[Id];
$first_part_of_photo = substr($Id_photo, 2, 2);
$second_part_of_photo = substr($Id_photo, 4, 2);
?>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><a href=featureddisplayprop.php?Id=<? echo $row[Id]; ?>><? echo $row[Id];?></a>
</td>
</tr>
<tr>
<td align="center"><p><a href=featureddisplayprop.php?Id=<? echo $row[Id]; ?>>
<?
$find_image2 = "/var/www/html/propimages/$first_part_of_photo/$second_part_of_photo/$row[Id].jpg";
if (file_exists($find_image2)) {
echo("
<a href='../$row[type]/featureddisplayprop.php?Id=$row[Id]' target=_blank>
<img src=http://www.xxx.net/propimages/$first_part_of_photo/$second_part_of_photo/$row[Id].jpg width='60' height='50' border='0'</a>");
}
else {
echo "";
}
?>
</a></p>
</td>
</tr>
</table>
<tr>
<td><div align="center" class="results_per_page"></div></td>
</tr>
<tr>
<?
}
}
?>
</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>