Good day! Help a beginner please! I receive a list of folders through Yandex.Disk api:
$result = json_decode($result,true); foreach ($result['_embedded']['items'] as $file) { $extpath = $file['name']; Then for each folder you need to get a list of files, I do another foreach inside this:
$result3 = json_decode($result3,true); foreach ($result3['_embedded']['items'] as $file3) { $extpath2 = $file3['name']; And at the end of all cycles if I do return $extpath; then only the folder list is displayed. And if return $extpath; , then only a list of files in all folders.
Attention, question: How can I get separately and a list of folders and a list of files? To make it like this:
Folder1 >> File1, File2
Folder2 >> File1, File2, File3
Thank!