You are here: i will kill my(sql) self ! :-) « PHP Programming Language « IT news, forums, messages
i will kill my(sql) self ! :-)

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация