Passing arguments to a function?
- by dfjhdfjhdf
I need to learn how to pass an associative array to a function so that I could do the following within the function:
function someName($argums) {
if (gettype($argums) != 'array' ||
!array_key_exists('myOneKey', $argums) ||
!array_key_exists('myOtherKey', $argums)) {
return false;
}
/*do other stuff*/
}
(That's how I would do in PHP what I am looking for in JavaScript.)