$db = new mysqli('localhost', 'root', '', 'price');
$query = mysqli_query($db,"SELECT * FROM `article` ORDER BY price");
$row = mysqli_num_rows($query);
$query2 = mysqli_query($db,"SELECT * FROM `article2` ORDER BY price");
$row2 = mysqli_num_rows($query2);
echo '<div id="section__text1">';
echo '<table>';
echo '<tr>';
echo '<td>';
$i=1;
while($data = mysqli_fetch_assoc($query)){
echo '<p><img src="/assets/img/иконка-галочка-1.png" class="section__img"><p/>';
echo '<h2 class="section__name">' . $data["name"] .'<br>' . '</h2>';
echo '<h4 class="section__description">' . $data["description"] .'<br>' . '</h4>';
echo '<h3 class="section__price">' . 'Cтоимость: ' . $data["price"] . ' рублей' . '</h3>' .'<br>';
echo '<a class="section__btn" href="#">Заказать звонок</a>';
if(($i%4) == 0) echo '</td><td>';
$i++;
}
echo '</tr>';
echo '</table>';
echo '</div>';
echo '<div id="section__text2">';
echo '<table>';
echo '<tr>';
echo '<td>';
$i=1;
while($data = mysqli_fetch_assoc($query2)){
echo '<p><img src="/assets/img/иконка-галочка-1.png" class="section__img"><p/>';
echo '<h2 class="section__name">' . $data["name"] .'<br>' . '</h2>';
echo '<h4 class="section__description">' . $data["description"] .'<br>' . '</h4>';
echo '<h3 class="section__price">' . 'Cтоимость: ' . $data["price"] . ' рублей' . '</h3>' .'<br>';
echo '<a class="section__btn" href="#">Заказать звонок</a>';
if(($i%4) == 0) echo '</td><td>';
$i++;
}
echo '</tr>';
echo '</table>';
echo '</div>';