Re: Howto re-pass arguments?
- From: "Thomas Mlynarczyk" <thomas@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 21 Oct 2007 13:55:41 +0200
Also sprach zapzap:
Is it possible to pass all arguments to another function?
Yes: http://de2.php.net/call_user_func_array.
function A()
{
$tmp = func_get_args();
return call_user_func_array( 'B', $tmp );
}
function B() { /* do something */ }
BTW, you cannot pass func_get_args() directly as a parameter to
call_user_func_array(), as PHP will get confused and report an error.
Therefore, it is necessary to go via the $tmp variable.
Greetings,
Thomas
--
C'est pas parce qu'ils sont nombreux a avoir tort qu'ils ont raison!
(Coluche)
.
- References:
- Howto re-pass arguments?
- From: zapzap
- Howto re-pass arguments?
- Prev by Date: Re: PHP cannot see Mysql?! Ideas?
- Next by Date: Re: PISSING AND SHITTING ALL OVER JERRY STUCKLE
- Previous by thread: Re: Howto re-pass arguments?
- Index(es):