query($sql); while ($articleDb = mysqli_fetch_object($result_articles)) { $value = $articleDb->value; } $file = $articleDb->Ordner . ' "Deutsch","Englisch" '; fwrite($myfile, $file); $sql = "SELECT `value` FROM `VokabelBox2Content` WHERE `type` = 'voc' AND `path`= '$userid/lang/$list/' ORDER BY `lastedit` DESC"; $result_articles = $conn->query($sql); while ($articleDb = mysqli_fetch_object($result_articles)) { $voc = json_decode($articleDb->value, true); $Sprache1 = html_entity_decode($voc[0]['1']); $Sprache2 = html_entity_decode($voc[0]['2']); htmlspecialchars_decode($Sprache1); htmlspecialchars_decode($Sprache2); $Sprache1 = str_replace("\"", "\"\"", $Sprache1); $Sprache2 = str_replace("\"", "\"\"", $Sprache2); $file = "\"$Sprache1\",\"$Sprache2\""; fwrite($myfile, $file); fwrite($myfile, "\r\n"); } fclose($myfile); ?>