retrieve multiple images from database using php

I'm somewhat new to coding websites. I'm trying to have a code where it pulls multiple images from a single database and displays it in a grid, not a table. At the top of my page I have a normal connection to the database. (very sorry about not having a code snippet, I'm new to daniweb and keep having errors when trying to use code snippets.)

<div id="grid" class="grid-container"> <?php
while ($row = mysqli_fetch_array($query))

echo '<div class="grid-item">
<p>'.$row['images'].'</p>
<p>'.$row['project'].'</p>
<p>'.$row['summary'].'</p>
</div>';

?> </div>