php mysqli获取数组不输出结果

时间:2014-05-29 10:01:59

标签: php syntax-error

所以我对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";
}?> 

1 个答案:

答案 0 :(得分:3)

愚蠢的额外分号

while($row =  $result->fetch_array()); {
                                     ^