-1
if ($result->num_rows > 0) {
            $x = 0;

            // output data of each row
            echo "<div class='row'>";

            while($row = $result->fetch_assoc()) {

                echo "<div class='col'><img class='img-fluid' src='img_pokemon/" . $row["link"] . "'></div>";

                $x++;

                if ($x == 3) {
                    echo "</div>";
                    echo "<div class='row'>";
                    $x = 0;
                }                   
            }       
            echo "</div>"; // first class: row
        } 

try to do Grid View like below image (3 images in a row using Bootstrap 4) but i cannot remove spaces between columns (where circled in the pic.)

enter image description here

sanoj lawrence
  • 844
  • 4
  • 28
  • 64
Hoyin Cheung
  • 31
  • 1
  • 7

1 Answers1

0

add class ".px-0" to col to remove space