У меня есть массив снаружи:
$myArr = array();
Я хотел бы предоставить доступ моей функции к массиву вне его, чтобы он мог добавлять к нему значения
function someFuntion(){
$myVal = //some processing here to determine value of $myVal
$myArr[] = $myVal;
}
Как присвоить функции правильную область видимости переменной?