require("include/top.php"); $query = "SELECT logos.id,logos.file FROM logos"; $result = mysql_query($query); while ($tmp = mysql_fetch_assoc($result)) $logos[] = $tmp; ?> foreach ($logos as $logo) { // we display each logo ?>