php - How to Convert Array to Params of Method? -


i need pass params (like: 'param1', 'param2', 'param3') method... have array of params (like: array('param1', 'param2', 'param3')). how convert array params?

function foo(array $params) {      bar(         // here should inserted params not array.     );  } 

use function call_user_func_array.

for example:

call_user_func_array('bar', $params); 

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -