Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Mark Smith
January 21, 2010, 4:28 pm
rate this thread
How do you pass a variable number of arguments when you don't know the
exact number until runtime?
I'm not sure if I can articulate this correctly, but here goes:
For example, the following function takes any number of arguments and
foreach(func_get_args() as $arg)
echo "$arg </br>";
How would I pass all of these arguments, to another function, as
seperate arguments themselves (i.e not wrapping them in an array)?