所以我对mysqli很新,我试图回应数据库中表格的结果
<?php
$link = mysqli_connect("localhost", "root", "", "juneausmashbros");
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
$query = "SELECT * FROM post";
$result = mysqli_query($link, $query);
while($row = $result->fetch_array()); {
echo '<div><b>';
echo $row['title'];
echo '</b></div>';
echo "\n";
}?>
答案 0 :(得分:3)
while($row = $result->fetch_array()); {
^