<?php
$dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
$query = "SELECT venik_id, vid, name, cena_opt, cena_krup_opt, cena_roznica, photo FROM veniki";
$data = mysqli_query($dbc, $query);
while ($row = mysqli_fetch_array($data)) {
echo '<div class="bbcode">';
echo '<tbody>';
echo '<tr>';
echo '<td><img src="images/'.$row['photo'].'"><a href="#">Купить</a></td>';
echo '<td>'.$row['name'].'</td>';
echo '<td>'.$row['cena_roznica'].' рублей</td>';
echo '<td>'.$row['cena_opt'].' рублей</td>';
echo '<td>'.$row['cena_krup_opt'].' рублей</td>';
echo '</tr>';
echo '</tbody>';
echo '</div>';
}
?>