<?php
$files=glob("images/*.*"); // if you get specific file change file extension eg : glob("file path /*.jpg") .
print_r($files);
?>
<br>
<select id="count_number">
<option value="">Choose</option>
<?php
foreach($files as $filename)
{
$arr = explode("/",$filename);
?>
<option value=""><?php echo $arr[1]; ?></option>
<?php
}
?>In this code you will learn how to get all file and specific file into folder using php.
