joane1;10877513 wrote:ok, sounds good.
But how can i assign the values (file names) to one or more variables?
i tried this, but it shows only one value:
echo $files[0];
Not sure I follow, but $files will be an array of matches that you can traverse that via a [man]foreach[/man] loop, or use any of the many array functions to further manipulate the array. For instance, if you wanted a list of links:
<ul class='file_list'>
<?php
foreach($files as $file)
{
echo "<li><a href='".$file."'>".basename($file)."</a></li>\n";
}
?>
</ul>