我正在尝试显示数据库中的图像,以便为正确的玩家显示正确的图像(同时它应该显示在我有占位符的位置),我一直在阅读较旧的文章,但似乎无法理解出去...

<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "reapers";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// SELECT (whatever rows you want) FROM (your table name)
$sql = "SELECT ID, NAME, image FROM players";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
// Outputting HTML and the data from the …Run Code Online (Sandbox Code Playgroud)