Reply to Re: [PHP] expand array into function arguments?

Your name:

Reply:


Posted by Richard Lynch on 05/12/05 00:40

On Wed, May 11, 2005 12:13 pm, Christopher J. Bottaro said:
> You can do this in Python:
>
> <code>
> def myFunc(arg1, arg2, arg):
> #do something
>
> myList = [1, "arg", 5]
> myFunc(*myList) # calls myFunc(1, "arg", 2)
> <code>
>
> Can that be done in PHP, and if so, how?

You mean call a user function with an array for the parameters?

Didja search the PHP website?

You should have found this:

http://php.net/call_user_func_array

--
Like Music?
http://l-i-e.com/artists.htm

[Back to original 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

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