I have a site architechure where I assign content to variables and then print them in a master page. My problem is that php code in the sub pages is imported into the variab
file_get_contents returns the actual contents of a file, what you need is include, which actually parses a PHP file.
file_get_contents