Afficher un message
Vieux 21/10/2007, 15h08   #7
zapzap
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Howto re-pass arguments?

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-)

  Réponse avec citation
 
Page generated in 0,05838 seconds with 9 queries