Depending on the context of your code, you probably just need to use
myFunction($array);
and modify your function
function myFunction ($array) {
...
}
Have a look here: https://www.w3schools.com/php/php_functions.asp
0
solved How to pass an array to function