Reputation: 403
i am looking for a way to just show folders in php.
i am getting files like this returned from my amazon foreach loop using undesigneds s3 class.
Computer Fix Files/files/driver-ml-dlan-usb-windows-r2.exe
here my foreach.
foreach ($contents as $file){
$folder = rtrim($file['name'], "/");
if (!preg_match("/[0-9\.\-\_]/i", $folder)) { ?>
<?php echo $folder; ?>
<?php }
}
ok this kinda works but what i really want to do is just list the first folder.
so instead of this.
Computer Fix Files/files/
it would just show.
Computer Fix Files
any help please????
Upvotes: 0
Views: 391