Question: This is my code:

```
<?php 
mysql_connect("localhost","*****","********") or die("Can't connect to DB");
mysql_select_db("kroltan_main") or die("Can't select to DB");
$result = mysql_query("SELECT * FROM comments") or die("Can't fetch data");
if(mysql_num_rows($result) > 0){
    $info = mysql_fetch_assoc($result);
    while($row = mysql_fetch_assoc($result)){
        echo "<div class='t_post'>";
        echo "<div class='t_message'>" .$row["comment"]. "</div>";
        echo "<div class='t_info'>" .$row["name"]. "</div>";
        echo "</div>";
    }
}
?>

```

I'm trying to generate a container div with two divs inside, one that shows the "name" value of a MySQL row, and the other that shows the "comment" value. But when i test it, there are no contents (nothing is echoed). My MySQL table has contents on it, so it's a problem with my code. <http://kroltan.eliti.com.br/?/=Talk>. The page has some info on it, but that's irrelevant.

Answer: 
Remove the line that has `$info = mysql_fetch_assoc($result);` in it. Should work (requires that your query is correct)
```
// connect

$result = mysql_query('SELECT * FROM `comments`') or die("Can't fetch data"));

if(mysql_num_rows($result) > 0) {
    while($row = mysql_fetch_assoc($result)) {
        // display data
    }
}

```

That should work!

The `mysql_fetch_assoc` function should be called in the while loop condition. If you call `mysql_fetch_assoc` outside of the condition, it'll only return the first row.