|
Posted by g0c on 11/14/05 17:18
hi all,
i really cannot find a simple exmaple for preg_match function
i whiled the files in the directory ...
$d = dir('.') or die($php_errormsg);
while (false !== ($f = $d->read())) {
if (is_file($d->path.'/'.$f)) {
if (preg_match(match????,substr($f,3))) {
// print '<option> ' . $f . '<option>';
echo "$f\n";
}
}
}
$d->close();
i want to include files begining with "tn_"
what in the heck must stand in pattern position, i tried everything ,
nothing worked
i have actually 8 files starting with tn_* of course ...
thanks
Navigation:
[Reply to this message]
|