I am fairly new to PHP. I am trying to write a script which calls on another file which also includes PHP code, but thus far I cannot get it to work.
To bring the contents of the other file into the original page my code is:
<?php
$menu = file_get_contents("menudata.php");
print("$menu");
?>
.. and it works. But the PHP script written on menudata.php does not function at all. When I check the source - the PHP code itself is actually listed there. I've tested menudata.php individually and it works, so there is no problem with my syntax, I just don't know how to make it work / turn it "on". Hopefully the solution is simple.
Thanks in advance.