$GLOBALS['foo']['candy'] = 'BAR'; function does($a) { return $GLOBALS['foo'][$a]; } echo does('candy'); // BAR