Jump to content

Converting an array into function parameters?


MrAdam

Recommended Posts

Hey guys.I was just wondering if anyone could tell me the best method of converting an array of values into function parameters? I've come across this problem before when I was working with an object factory, and kept meaning to find out. I've had a look on Google but couldn't really find anything.So as an example:

callFunction('myfunction', array('param1', 'param2'));

function myfunction($param1, $param2){	// ...}

How would I process that array and populate the function call?Thank you for any help you can give.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...