Is there anyway to for an included file to be used in a parent scope to the one it was called in? The following example is simplified, but does the same job.
In esse
The only way I know how to is to use the superglobal array.
main.php:
$GLOBALS['myVar'] = 'something bar foo'; $success = myPlugin('included.php'); if($success) { echo $GLOBALS['myResult']; }
included.php: