$menuepunkt = 'index'; include("code/dbconnect.php"); $sql = "SELECT * FROM photos ORDER BY reihenfolge"; $rs = mysql_query($sql, $conn); $bilder = ""; $worksIds = ""; $zaehler = 0; if ($rs) { while ($row = mysql_fetch_array($rs, MYSQL_ASSOC)) { $zaehler++; $bilder .= "'bilder/".$row['bildname']."',"; $worksIds .= "".$row['worksId'].","; } } $bilder = substr($bilder,0,strlen($bilder) - 1); $worksIds = substr($worksIds,0,strlen($worksIds) - 1); ?>