{"1":"d.txt","2":"dj.txt"}
{"1":"d.txt"}{"2":"dj.txt"}
<?
$files = array_diff(scandir("plug/lol/"), ['.','..']);
$lole = [
"count" => count($files)
];
//echo json_encode($lole);
foreach($files as $key=>$lol){
$result = [
$key-1=> $lol
];
echo json_encode($result);
}
?>