Dear NogDog,
Thanks alot for your replies and Help...
I have code it as below :
function jumi_code($regex, $string){
if(preg_match($regex, $string)== 1){
$string_jumi_exploded = explode("{", $string);
echo $string_jumi_exploded[0]."<br />";
$string_jumi_exploded_deep = explode("}", $string_jumi_exploded[1]);
$string_to_explode = $string_jumi_exploded_deep[0];
//TO GET THE FILE NAME
$string_exploded = explode("|",$string_to_explode);
$array = explode("-",$string_exploded[1]);
$registration = $_SERVER['DOCUMENT_ROOT']."/".$array[0]."/".$array[1]."/code/".$array[2];
//END
//INCLUDE THE FILE
if (file_exists($registration)) {
include($registration);
} else {
echo "The file <b style=\"color: #990000;\">$array[2]</b> does not exist <br />";
}
echo $string_jumi_exploded_deep[1];
}
else{
echo $string;
}
echo "<hr>";
}
$string_jumi = "Heloo, I just want to test whether the include can works inside the text. <br />
For example let say we have this {JUMI|15-14-registration.php|} . and see what it returns.<br /><br /> ";
$regex = '/{(jumi)\s(.?)}/i';
jumi_code($regex,$string_jumi);
This didn't really not the good solution for my problem... But this the solution I'm using for the moment....
Thanks alot for being the helping hand friend.. Really appreciated it...