hi, i have a problem with eval function in function 🙂
source:
function show_result(){
$result = "sth\n";
$hello = "hi\n";
$file_contents ="<p><?echo $hello?></p>";
$phpOpenTag = "<${questMark}";
$phpCloseTag = "${questMark}>";
$result .= eval("$phpCloseTag".$file_contents. "$phpOpenTag ");
$result .= "sth\n";
return $result;
}
but the result is:
hi
sth
sth
instead of:
sth
hi
sth
why???