Edit: For all those who are downvoting, this isn't the same question asked many times before. I'm NOT A PHP developer. I want to retrieve all the images names from a folder on my FTP server. I googled and found this script:
<?php
foreach (new DirectoryIterator(__DIR__) as $file) {
if ($file->isFile()) {
print $file->getFilename() . "
";
}
}
?>
Since I'm not a PHP dev, I can't understand even a word of it.
What I Want: Modify PHP script so that it returns an array containing file names and want some android code which accepts the array.
Thank You!