0
I have the following code:
<?php
$arquivo = scandir("Arquivo");
$data = array();
foreach ($arquivo as $img) {
if (!in_array($img, array(".",".."))) {
$filename = "Arquivo" . DIRECTORY_SEPARATOR . $img;
$info = pathinfo($filename);
$info["size"] = filesize($filename);
array_push($data, $info);
}
}
echo json_encode($data);
?>
And I can’t print JSON with Line break, the information goes side by side.
Screenshot of how the code is coming out
In the attached image it shows how the information is coming out and in the image it also has a notepad showing how accurate the information is printed.
Any suggestions?