You are here: Re: Howto re-pass arguments? « All PHP « IT news, forums, messages
Re: Howto re-pass arguments?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация