while($data = mysql_fetch_assoc($sql2)) { $images[] = $data['location']; } ?>