Hello,
I noticed that within the realm of MODx Rev, ‘global’ takes no effect within a function. i.e.
$foo = 1;
function display_foo() {
global $foo;
echo $foo;
}
foo() is empty;
(I did check whether it works outside MODX and it does, so it is not a server issue)
Only in case of:
$GLOBALS[‘foo’] = 1;
it works.
How come and is there another way to make the value available?