function parts($part) { $structure = \'http://\' . $site_url . \'content/\'; echo($tructure . $part . \'.php\'); }
This function uses a
Alternatively, you can bring variables in from the outside scope by using closures with the use keyword.
use
$myVar = "foo"; $myFunction = function($arg1, $arg2) use ($myVar) { return $arg1 . $myVar . $arg2; };