It seems I'm a little old school when it comes to php/mysql and to be honest only just getting used to it but now I keep getting told to use **mysqli** rather then **mysql** so I been I've reading a few posts/articles and such including php.net about it but none of it is making sense to me so thought maybe if some would give me an equivalent to my snippet I might start to get an understanding of it a little better...

This is a simple mysql while loop:

```
$query  = "SELECT * FROM foo ORDER BY id DESC LIMIT 10, 10";
$result = mysql_query($query);

while ($row = mysql_fetch_array($result)) {

$dog = $row['dog'];

  echo $dog;

}

```