Passing arguments to a function?
Posted
by dfjhdfjhdf
on Stack Overflow
See other posts from Stack Overflow
or by dfjhdfjhdf
Published on 2010-05-31T11:38:41Z
Indexed on
2010/05/31
11:42 UTC
Read the original article
Hit count: 154
JavaScript
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.)
© Stack Overflow or respective owner