I want to include the content from a php file into another php file. (It’s in a wordpress site)
Include or require won’t work because it’s just including the file, I need the content itself.
file_get_contents is also not working because it just displays my php code and does not execute it.
what function do I have to use?
Pause. What? Include includes the code in the file for you. I’m sure this is what you want. For instance, see the code below.
test.phphasvars.phpincluded in it and its able to echo the variables fromvars.php