There are several issues with your code; Missing semicolons and brackets. After fixing those, it should work.
This is what your code should look like:
<?php
$dir = '/public_html/bioImages';
$directory = scandir($dir);
foreach ($directory as $filename){
?>
<option value="<?php echo $filename;?>"> <?php echo $filename;?> </option>
<?php } ?>