Игнорирует или не видит условие и div просто не отображается. Код (Text): $html = '<div align="left"><table>'; $i = 1; while($product = mysql_fetch_assoc($product_list)) { $a = $i % 3; if($a == 1) $html .= '<tr>'; $html .= '<td valign="top" class="list_cell"> <a class="inlist_img" href="product_page.php?id='.$product['id'].'&cat='.$id.'"> <img width="180" height="245" border="0" vspace="10" src="img_mid/'.$product['image_main'].'"></a><br> <a class="inlist" href="product_page.php?id='.$product['id'].'&cat='.$id.'">'.$product['synonym'].' '.$product['brand_name'].' '.$product['model_name'].'</a><br>'; if ($total_summ > 5000) { $s_price = $product['price_normal'] * 0.95; '<div align="right" class="price_in_list">'.$s_price.' <font size="-1">рублей</font></div>'; } else { '<div align="right" class="price_in_list">'.$product['price_normal'].' <font size="-1">рублей</font></div>'; } '</td>'; if($a == 0) $html .= '</tr>'; $i++; } if($a != 0) $html .= '</tr>'; $html .= '</table></div>'; echo $html;