$sql = mysql_query("SELECT * FROM `img` ORDER BY `id` DESC"); while ($img = mysql_fetch_assoc($sql)) { echo '<img src="/src/img/blog/'.$img['img'].'" /></br>'; echo '<span id="log"></span>'; }