Functions with a variable number of arguments
Posted: Tue Oct 04, 2011 8:34 am
Hi everyone,
This is something I've seen done in other people's code, but the code has been too complex for me to understand; how do you code a function to accept a variable number of arguments, so that
and
Would both be valid?
Thanks in advance,
Matt
This is something I've seen done in other people's code, but the code has been too complex for me to understand; how do you code a function to accept a variable number of arguments, so that
Code: Select all
DoThisFunction($var1, $var2, $var3);Code: Select all
DoThisFunction();Thanks in advance,
Matt