Re: Unknown number of incoming parameters



On 2005-08-01 03-28-09 Luthor <Luthor <bbrunno3000@xxxxxxxxx>> wrote:
> say I have a function foo() and the number of incoming parameters could
> conceivably be random.
>
> For example, foo() could be called w/ 0 params, and sometimes it could be
> called w/ 9 parameters. I know C does this, but is there a way to trap this
> w/o using foo(array( param1=>x....})
>
> in C, the function declaration is something to the effect of foo(...)
>
> Thanks

http://de3.php.net/manual/en/function.func-num-args.php and the other
functions mentioned ("See also") should help you.

HTH,
Simon
--
Simon Stienen <http://slashlife.org/>
"What you do in this world is a matter of no consequence,
The question is, what can you make people believe that you have done."
/Sherlock Holmes in A Study in Scarlet by Sir Arthur Conan Doyle/
.