$files) { foreach ($files AS $file) { if (preg_match('#\.php$#', $file)) { $flatlist[] = "./$basepath$file"; } } } return $flatlist; } // ################################################################### // ################################################################### $listing = fetch_flat_listing(fetch_listing(getcwd())); foreach ($listing AS $filename) { $file = file_get_contents($filename); preg_match_all("#lang::r\('(.*?)'\)#", $file, $matches); foreach ($matches[0] AS $matchid => $match) { lang::r($matches[1]["$matchid"]); } } ?>