Hallo,
ich habe folgendes Problem. Wenn ich den folgenden Code ausführe, dannn listet er mir die Ausgabe untereinander. Ich hätte aber gern, dass die Ausgabe in 2 Spalten erfolgt und dann ein Zeilenumbruch erfolgt.
Jetzt sieht es so aus:
Artikel 1
Artikel 2
Artikel 3
Artikel 4
usw. und es soll so ausgegeben werden:
Artikel 1 Artikel 2
Artikel 3 Artikel 4
usw. usw.
Wer kann mir helfen?
HIer nun mein Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Testabfrage</title>
<link rel="STYLESHEET" type="text/css" href="css/na.css">
</head>
<body>
<?
require("conf.inc");
$db = mysql_connect(DBHOST, DBUSER, DBPASSWD);
$res = mysql_db_query(DBNAME, "select * from discount24 where ProductCategoryID = '20954'");
$num = mysql_num_rows($res);
// Tabellenbeginn
echo "<table align='center' cellpadding='0' cellspacing='0' width='750' border='0'>";
echo "<tr><td>";
for ($i=0; $i<$num; $i+=1)
{
$ArtNumber = mysql_result($res, $i, "ArtNumber");
$Title = mysql_result($res, $i, "Title");
$description_short = mysql_result($res, $i, "description_short");
$description = mysql_result($res, $i, "description");
$ProductCategoryID = mysql_result($res, $i, "ProductCategoryID");
$ProductCategory = mysql_result($res, $i, "ProductCategory");
$price = mysql_result($res, $i, "price");
$price_old = mysql_result($res, $i, "price_old");
$currency = mysql_result($res, $i, "currency");
$Img_url1 = mysql_result($res, $i, "Img_url1");
$Img_url2 = mysql_result($res, $i, "Img_url2");
$Img_url3 = mysql_result($res, $i, "Img_url3");
$deeplink1 = mysql_result($res, $i, "deeplink1");
$deeplink2 = mysql_result($res, $i, "deeplink2");
$keywords = mysql_result($res, $i, "keywords");
$manufacturer = mysql_result($res, $i, "manufacturer");
$brand = mysql_result($res, $i, "brand");
$distributor = mysql_result($res, $i, "distributor");
$valid_from = mysql_result($res, $i, "valid_from");
$valid_to = mysql_result($res, $i, "valid_to");
$update_date = mysql_result($res, $i, "update_date");
$Img_width1 = mysql_result($res, $i, "Img_width1");
$Img_height1 = mysql_result($res, $i, "Img_height1");
$Img_width2 = mysql_result($res, $i, "Img_width2");
$Img_height2 = mysql_result($res, $i, "Img_height2");
$Img_width3 = mysql_result($res, $i, "Img_width3");
$Img_height3 = mysql_result($res, $i, "Img_height3");
$update_datee = mysql_result($res, $i, "update_datee");
$valid_fromm = mysql_result($res, $i, "valid_fromm");
$valid_too = mysql_result($res, $i, "valid_too");
$EAN = mysql_result($res, $i, "EAN");
// Tabellenzeile mit -zellen
echo "<table width=240 cellspacing=0 cellpadding=0 border=0>";
echo "<tr>";
echo " <td colspan=3 bgcolor=#bf0714><img src=\"images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>";
echo "</tr>";
echo "<tr>";
echo " <td width=1 bgcolor=#bf0714><img src=\"images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>";
echo " <td width=238 bgcolor=#bf0714><table width=238 cellspacing=0 cellpadding=3 border=0><tr><td class='fueberschrift'>$Title</td></tr></table></td>";
echo " <td width=1 bgcolor=#bf0714><img src=\"images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>";
echo "</tr>";
echo "<tr>";
echo " <td colspan=3 bgcolor=#bf0714><img src=\"images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>";
echo "</tr>";
echo "<tr>";
echo " <td width=1 bgcolor=#bf0714><img src=\"images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>";
echo " <td width=238><a href='$deeplink1' target='_blank'><img src='$Img_url1' border=0></a></td>";
echo " <td width=1 bgcolor=#bf0714><img src=\"images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>";
echo "</tr>";
echo "<tr>";
echo " <td width=1 bgcolor=#bf0714><img src=\"images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>";
echo " <td width=238><table width=238 cellspacing=0 cellpadding=3 border=0><tr><td class='fliesstexte'>$description</td></tr></table></td>";
echo " <td width=1 bgcolor=#bf0714><img src=\"images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>";
echo "</tr>";
echo "<tr>";
echo " <td width=1 bgcolor=#bf0714><img src=\"images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>";
echo " <td width=238 align=right><table width=238 cellspacing=0 cellpadding=3 border=0><tr><td class='fliesstexte' align=right><a href='$deeplink1' target='_blank'>mehr...</a></td></tr></table></td>";
echo " <td width=1 bgcolor=#bf0714><img src=\"images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>";
echo "</tr>";
echo "<tr>";
echo " <td colspan=3 bgcolor=#bf0714><img src=\"images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>";
echo "</tr>";
echo "</table><br><br>";
}
// Tabellenende
echo "</td></tr>";
echo "</table>";
mysql_close($db);
?>
</body>
</html>
ich habe folgendes Problem. Wenn ich den folgenden Code ausführe, dannn listet er mir die Ausgabe untereinander. Ich hätte aber gern, dass die Ausgabe in 2 Spalten erfolgt und dann ein Zeilenumbruch erfolgt.
Jetzt sieht es so aus:
Artikel 1
Artikel 2
Artikel 3
Artikel 4
usw. und es soll so ausgegeben werden:
Artikel 1 Artikel 2
Artikel 3 Artikel 4
usw. usw.
Wer kann mir helfen?
HIer nun mein Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Testabfrage</title>
<link rel="STYLESHEET" type="text/css" href="css/na.css">
</head>
<body>
<?
require("conf.inc");
$db = mysql_connect(DBHOST, DBUSER, DBPASSWD);
$res = mysql_db_query(DBNAME, "select * from discount24 where ProductCategoryID = '20954'");
$num = mysql_num_rows($res);
// Tabellenbeginn
echo "<table align='center' cellpadding='0' cellspacing='0' width='750' border='0'>";
echo "<tr><td>";
for ($i=0; $i<$num; $i+=1)
{
$ArtNumber = mysql_result($res, $i, "ArtNumber");
$Title = mysql_result($res, $i, "Title");
$description_short = mysql_result($res, $i, "description_short");
$description = mysql_result($res, $i, "description");
$ProductCategoryID = mysql_result($res, $i, "ProductCategoryID");
$ProductCategory = mysql_result($res, $i, "ProductCategory");
$price = mysql_result($res, $i, "price");
$price_old = mysql_result($res, $i, "price_old");
$currency = mysql_result($res, $i, "currency");
$Img_url1 = mysql_result($res, $i, "Img_url1");
$Img_url2 = mysql_result($res, $i, "Img_url2");
$Img_url3 = mysql_result($res, $i, "Img_url3");
$deeplink1 = mysql_result($res, $i, "deeplink1");
$deeplink2 = mysql_result($res, $i, "deeplink2");
$keywords = mysql_result($res, $i, "keywords");
$manufacturer = mysql_result($res, $i, "manufacturer");
$brand = mysql_result($res, $i, "brand");
$distributor = mysql_result($res, $i, "distributor");
$valid_from = mysql_result($res, $i, "valid_from");
$valid_to = mysql_result($res, $i, "valid_to");
$update_date = mysql_result($res, $i, "update_date");
$Img_width1 = mysql_result($res, $i, "Img_width1");
$Img_height1 = mysql_result($res, $i, "Img_height1");
$Img_width2 = mysql_result($res, $i, "Img_width2");
$Img_height2 = mysql_result($res, $i, "Img_height2");
$Img_width3 = mysql_result($res, $i, "Img_width3");
$Img_height3 = mysql_result($res, $i, "Img_height3");
$update_datee = mysql_result($res, $i, "update_datee");
$valid_fromm = mysql_result($res, $i, "valid_fromm");
$valid_too = mysql_result($res, $i, "valid_too");
$EAN = mysql_result($res, $i, "EAN");
// Tabellenzeile mit -zellen
echo "<table width=240 cellspacing=0 cellpadding=0 border=0>";
echo "<tr>";
echo " <td colspan=3 bgcolor=#bf0714><img src=\"images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>";
echo "</tr>";
echo "<tr>";
echo " <td width=1 bgcolor=#bf0714><img src=\"images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>";
echo " <td width=238 bgcolor=#bf0714><table width=238 cellspacing=0 cellpadding=3 border=0><tr><td class='fueberschrift'>$Title</td></tr></table></td>";
echo " <td width=1 bgcolor=#bf0714><img src=\"images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>";
echo "</tr>";
echo "<tr>";
echo " <td colspan=3 bgcolor=#bf0714><img src=\"images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>";
echo "</tr>";
echo "<tr>";
echo " <td width=1 bgcolor=#bf0714><img src=\"images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>";
echo " <td width=238><a href='$deeplink1' target='_blank'><img src='$Img_url1' border=0></a></td>";
echo " <td width=1 bgcolor=#bf0714><img src=\"images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>";
echo "</tr>";
echo "<tr>";
echo " <td width=1 bgcolor=#bf0714><img src=\"images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>";
echo " <td width=238><table width=238 cellspacing=0 cellpadding=3 border=0><tr><td class='fliesstexte'>$description</td></tr></table></td>";
echo " <td width=1 bgcolor=#bf0714><img src=\"images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>";
echo "</tr>";
echo "<tr>";
echo " <td width=1 bgcolor=#bf0714><img src=\"images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>";
echo " <td width=238 align=right><table width=238 cellspacing=0 cellpadding=3 border=0><tr><td class='fliesstexte' align=right><a href='$deeplink1' target='_blank'>mehr...</a></td></tr></table></td>";
echo " <td width=1 bgcolor=#bf0714><img src=\"images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>";
echo "</tr>";
echo "<tr>";
echo " <td colspan=3 bgcolor=#bf0714><img src=\"images/blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\"></td>";
echo "</tr>";
echo "</table><br><br>";
}
// Tabellenende
echo "</td></tr>";
echo "</table>";
mysql_close($db);
?>
</body>
</html>