just to clear it up: $aryRegister is indeed a global variable, but inside a function or method you have to explicitly make it available using either the "global" keyword or the $GLOBALS array.

e. g.

PHP Code:

<?php

$x = 10;

function f() {
global $x; // access $GLOBALS['x']
echo $x;
}

f();

In your case, however, using the function parameters is indeed the only sensible option. You should generally be careful with global variables. Only use them for things which are actually supposed to be global and used everywhere (like configuration values). The normal way of passing values to functions is through the parameters.

try to declare arrays or variables as global

Hello friend,

you get these kind of errors when you do not declare the arrays or variables as global, so try to declare them as global or in the file where you are calling these functions but not in functions directly.