|
Posted by zapzap on 10/21/07 14:08
Thomas Mlynarczyk wrote:
> 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.
Great! Thanks! Danke! This solves my problem permanently 8-)
Navigation:
[Reply to this message]
|