Possible Duplicate:
How to pass a variable number of parameters to a function in PHP
I'm trying to dynamically populate parameters when calling a method based on get requests.
For example:
Let's say I have an array with four values:
array(1, 2, 3, 4);
Now I want to pass this to a method that accepts these four parameters. However, this needs to be dynamic, so I can't just do for example method($array[0], array[1], array[2], array[3])
.
My question is, how can I take an array with variable lengths and pass it to methods that may also accept varying parameters?
Thank you!