I'm trying to show all information from my mysql database using while loop, of course I could do this without while loop, but I want to show this information organized in html divs.
$cnt = mysqli_num_rows(mysqli_query($CONNECT, "SELECT * FROM `reviews`"));
echo $cnt;
while ($Row = mysqli_fetch_assoc($cnt)) {
echo '<div class="panel panel-default">
'.$Row['name'], $Row['text'].'
</div>';
}
Whats bad in my code, how I can fix it to make it work?