$value) { $id = $value[0]; $score1 = $value[1]; $score2 = $value[2]; $tipp = getTipp($name, $spieltag, $id); $paarungQuery = srowforeach("SELECT heim, gast from `buli-paarungen` where id=?;", [$id])[0]; $heim = $paarungQuery[0]; $gast = $paarungQuery[1]; $punkte = ps($name, $spieltag, $id); $result[]=["id"=>$id,"result"=>[$score1,$score2],"tipp"=>$tipp,"heim"=>$heim,"gast"=>$gast,"punkte"=>$punkte]; } echo json_encode($result, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE);