i'm using a dropbox api, and this is a part of my script:
$folders = $dropbox->GetMetadata("");
echo '<pre>';
print_r($folders).'
echo </pre>';
It returns an array like this:
stdClass Object
(
[hash] => 9539e595b82fce68ee1bcda37a23848f
[thumb_exists] =>
[bytes] => 0
[path] => /
[is_dir] => 1
[icon] => folder
[root] => dropbox
[contents] => Array
(
[0] => stdClass Object
(
[bytes] => 0
[rev] => e8b1169b0b4
[revision] => 3723
[icon] => folder_camera
[path] => /Camera Uploads
[is_dir] => 1
[thumb_exists] =>
[root] => dropbox
[modified] => Sun, 04 Jan 2015 08:12:03 +0000
[size] => 0 bytes
)
[1] => stdClass Object
(
[rev] => e5a1169b0b4
[thumb_exists] => 1
[path] => /DSC_0346.JPG
[is_dir] =>
[client_mtime] => Sun, 14 Dec 2014 08:52:25 +0000
[icon] => page_white_picture
[bytes] => 1777550
[modified] => Sun, 14 Dec 2014 08:52:25 +0000
[size] => 1.7 MB
[root] => dropbox
[mime_type] => image/jpeg
[revision] => 3674
)
But i just cant figure out how i list only all the directory names in one list. The directory names are named [path] in the array.
Can someone explain it to me?
foreach($array as $key => $value)then compare$key === "path"