I have a function:
function page( $variable ) {
function display_content() {
echo $variable;
}
require('folder/page.php');
}
As you can see it takes variable and requires a file, but does not do anything with this variable, this function also has another function in it. Then inside 'folder/page.php' i want to call a 'display_content' like:
<?php display_content() ?>
and it won't display anything. THE QUESTION IS: how to put a variable from a "parent" function inside a "child" function as a default argument so that the user can just call a "display_content" function and display $variable inside a "child" function from "parent" function without passing an argument.