<?php
mysql_query ("SET NAMES utf8");
mysql_query ("set character_set_client='utf8'");
mysql_query ("set character_set_results='utf8'");
mysql_query ("set collation_connection='utf8_general_ci'");
$sql = "SELECT * FROM `cups`";
$result = mysql_query($sql) or die (mysql_error() . ' <br />' . $sql);
$table= "<table class='cups_border' cellspacing='0' cellpadding='0'>\n";
while ($row = mysql_fetch_assoc($result)){
$table .= "<tr>\n";
$table .= "<td class='cup'><a rel='lightbox' title='".$row['number']."' href='".$row['big_foto']."'><img src='".$row['small_foto']."'></a></td>";
$table .= "<td>\n";
$table .= "<table class=' table_n' border='0' cellspacing='0' cellpadding='0'>\n";
$table .= "<tr>\n";
$table .= "<td>\n";
$table .= "<table class=' table_n' width='100%%' border='0' cellspacing='0' cellpadding='0'>\n";
$table .= "<td class='num' >".$row['number']."</td>\n";
$table .= "</tr>\n";
$table .= "<tr>\n";
$table .= "<td class='num' >Серія: ".$row['series']."</td>\n";
$table .= "</tr>\n";
$table .= "</table>\n";
$table .= "</td>\n";
$table .= "</tr>\n";
$table .= "<tr>\n";
$table .= "<td>\n";
$table .= "<table align='center' width='90%%' border='0' cellspacing='0' cellpadding='0'>\n";
$table .= "<tr >\n";
$table .= "<td class='cups_border2'></td>";
$table .= "<td class='cups_border2'>H(см)</td>";
$table .= "<td class='cups_border2'>D(мм)</td>";
$table .= "</tr>\n";
$table .= "<tr>\n";
$table .= "<td class='cups_border2'>A</td>";
$table .= "<td class='cups_border2'>".$row['A_h']."</td>";
$table .= "<td class='cups_border2'>".$row['A_d']."</td>";
$table .= "</tr>\n";
$table .= "<tr>\n";
$table .= "<td class='cups_border2'>B</td>";
$table .= "<td class='cups_border2'>".$row['B_h']."</td>";
$table .= "<td class='cups_border2'>".$row['B_d']."</td>";
$table .= "</tr>\n";
$table .= "<tr>\n";
$table .= "<td class='cups_border2'>C</td>";
$table .= "<td class='cups_border2'>".$row['C_h']."</td>";
$table .= "<td class='cups_border2'>".$row['C_d']."</td>";
$table .= "</tr>\n";
$table .= "</table>\n";
$table .= "</td>\n";
$table .= "</tr>\n";
$table .= "</table>\n";
$table .= "</td>\n";
$table .= "</tr>\n";
}
$table .= "</table><br>\n";
echo $table ;
?>