Hi I would like to list all specific files with the prefix myfile-..

This is my current code... and no files are listed

```
   <select name="s1">
        <option value="" selected="selected">-----</option>
        <?php 
            foreach(glob(dirname(__FILE__) . '/*') as $filename){
                $filename = basename($filename);
               // if (preg_match('/\.(php)$/i', $filename)) {
                    if (preg_grep('~^myfile-.*\.php$~', $filename)) {
                    echo "<option value='" . $filename . "'>".$filename."</option>";
                }
            }
        ?>

```

if I use this... all files are listed

```
 if (preg_match('/\.(php)$/i', $filename)) {

```

while no files are listed if using this

```
if (preg_grep('~^myfile-.*\.php$~', $filename)) {

```