From: Walter T. <php...@to...> - 2009-03-10 06:15:51
|
I'm trying to make call to a random class and pass an array for its arguements Similar to... http://www.php.net/manual/en/function.call-user-func-array.php#74427 $classObj = new ReflectionClass($_class); return $classObj->newInstanceArgs($_args); $_class is a valid class name $_arg is an array of parameters to send it The call sort of works; I get to the right class/method, but the arguments are converted to a string, and I only get the first element on my array. Not the behavior I'm reading/expecting. what am I doing wrong? I even tried this... return call_user_func_array( array(new ReflectionClass($_class), 'newInstance'), $_args ); same result: no array, just the first element of the array gets into the Thx Walter -- ...that's the thing about people who think they hate computers. What they really hate is lousy programmers. - Larry Niven and Jerry Pournelle in "Oath of Fealty" |