I have an array outside:
$myArr = array();
I would like to give my function access to the array outside it so it can add values to it
$myArr = array(); function someFuntion(array $myArr) { $myVal = //some processing here to determine value of $myVal $myArr[] = $myVal; return $myArr; } $myArr = someFunction($myArr);