私のデータベースには多数の画像があり、それらはすべて同じプロジェクト ID に対応しています。
ブラウザで並べて表示したい。
ただし、次のコードは最新の画像のみを出力し、すべてではありません。
//get all the images in this project and add them to the content variable for output
                if (!empty($FormProjectID)) {
                    $DBQuery3 = mysqli_query($dblink, "SELECT * FROM images WHERE project_id = '$FormProjectID'");
                    if (mysqli_num_rows($DBQuery3) < 1) {
                        $content = '
                            <p>This project is empty. <a href="index.php?page=upload&id='.$FormProjectID.'">Upload</a> some files to get started.</p>
                        ';
                    } else {
                        while($row = mysqli_fetch_array($DBQuery3)) {
                            $DBImageID = $row['image_id'];
                            $DBProjectID = $row['project_id'];
                            $DBImageName = $row['image_name'];
                            $DBImageDescription = $row['image_description'];
                            $DBDateCreated = $row['date_created'];
                            $DBLinkToFile = $row['link_to_file'];
                            $DBGivenName = $row['given_name'];
                            //if the image was given a name by the user, display it
                            //otherwise display the generated name
                            if (strlen($DBGivenName) > 1) {
                                $FileName = $DBGivenName;
                            } else {
                                $FileName = $DBImageName;
                            }
                            $content = '
                                <div class="image">
                                <a href="index.php?page=image&id='.$DBImageID.'"><img src="'.$DBLinkToFile.'" alt="'.$FileName.'" title="'.$FileName.'"/></a>
                                </div>
                            ';
                    }
                }
最終的にhtmlが次のようになるように、すべての画像を取得するにはどうすればよいですか。
<div class="image">
                                <a href="index.php?page=image&id='.$DBImageID.'"><img src="'.$DBLinkToFile.'" alt="'.$FileName.'" title="'.$FileName.'"/></a>
                                </div>
<div class="image">
                                <a href="index.php?page=image&id='.$DBImageID.'"><img src="'.$DBLinkToFile.'" alt="'.$FileName.'" title="'.$FileName.'"/></a>
                                </div>
<div class="image">
                                <a href="index.php?page=image&id='.$DBImageID.'"><img src="'.$DBLinkToFile.'" alt="'.$FileName.'" title="'.$FileName.'"/></a>
                                </div>
後で私のhtmlページで私は持っています:
<?php echo $content; ?>