Get array keys when in argument in PHP -
i'm passing arrays arguments inside function. example:
test($somearray[2][3]);
in case function gets value stored in (2,3) there way keys value (2,3) inside function work with? function should use x,y position of value calculations.
thanks!
not way, no. if call test($somearray[2][3])
, php pass value, not reference value comes from. cleaner pass values separately anyway
function test($x, $y, $value) { /* */ }
Comments
Post a Comment