我不知道为什么不显示头像100x100。出问题了,我不知道如何解决。
$result = mysqli_query($con,"SELECT * FROM `users` WHERE `verified` = 1 and lastcheck=0 order by `authoredPostCount` DESC");
echo "<table border='1'> <tr>
<th>Picture</th>
<th>Verified</th>
<th>Videos</th></tr>";
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row "<img src="['avatar']."></td>";
echo "<td>" . $row['userId'] . "</td>";
echo "<td>" . $row['authoredPostCount'] . "</td>";
echo "</tr>";
}
echo "</table>";
if (!$cuserId) {
printf("Error: %s\n", mysqli_error($con));
exit();
}
mysqli_close($con);
?>
最佳答案
更换
echo "<td>" . $row "<img src="['avatar']."></td>";
用
echo "<td><img src=". $row['avatar']."></td>";
关于php - 无法显示图片,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/22430305/