Re: Unknown number of incoming parameters
- From: Simon Stienen <news@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 1 Aug 2005 17:48:11 +0200
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/
.
- References:
- Unknown number of incoming parameters
- From: Luthor
- Unknown number of incoming parameters
- Prev by Date: Re: Warning with PHP 4
- Next by Date: Zend Debug problem
- Previous by thread: Re: Unknown number of incoming parameters
- Next by thread: Class Redefinition Error
- Index(es):
Relevant Pages
|