Hi I am trying to find a way that if I write {} and put a file name in between those simples it will fetch the file from the server and include it where that {} is.
$search = "[login]this is a test[members]";
$fetching = preg_replace('#\[([a-zA-Z0-9]+\.[a-z])\]#', '', $search);
$fetch->getcontents($fetching);
function getcontents($matches) {
//print $matches;
$remove = array("[","]");
$fetchfile = str_replace("[", "", $matches);
$this->matches = str_replace("]", "", $fetchfile);
$url = $this->matches;
$file = file_get_contents("modules/$url.php", FILE_USE_INCLUDE_PATH);
print $file;
}