$fragen=''; $res_tutorial=tri_db_query ($GLOBALS['datenbanknamecms'], "SELECT * FROM tutorial where produktid='$produktid' and papierkorb='0' order by datum desc"); if(mysql_num_rows($res_tutorial)>0){ while($row_tutorial = mysql_fetch_array ($res_tutorial)){ $fragen.=''.$row_tutorial['titel'].'
'; $objekte=''; $res = tri_db_query ($GLOBALS['datenbanknamecms'], "SELECT ID,typ,text FROM tutorial_objekt WHERE tutorial_id='".$row_tutorial['ID']."' AND onlinefreigabe_obj='1' AND typ<>'0' ORDER BY seite ASC,prio asc"); while ($row = mysql_fetch_assoc ($res)) { if($row['typ']==1){ $fragen.=$row['text'].'
'; }elseif($row['typ']==3){ $fragen.='
'; } } $fragen.='
'; } } $ausgabe=str_replace('{fragen}',$fragen,$ausgabe);