The "global" keyword doesn't make a variable global; the variable is global already. So "global $array;" means "make the global variable $array available to this function." (The global scope comprises everything outside of functions and classes.)
In your example code $array is passed to the function as a parameter. You can use it as you wish in the function. For example, "$array[] = 10;" or "echo $array[$keyFromArray];". If you want changes inside the function to affect the global array, make the parameter a reference: function getValue(& $array, $keyFromArray), or, usually better, return a value to apply to the array.