You are here: Re: How to pass array names to function parameters ? « PHP Programming Language « IT news, forums, messages
Re: How to pass array names to function parameters ?

Posted by tony on 04/16/06 11:07

In article <1145134642.131789.187380@j33g2000cwa.googlegroups.com>,
damirz@gmail.com says...
> But you still can try with $HTTP_*_VARS :)
>
> // $nextGlobal = {"GET", "POST", ...}
>
> function showthisarray($nextGlobal) {
> echo($nextGlobal . "\n"); // debug line
> foreach(${'HTTP_' . $nextGlobal . '_VARS'} as $k => $v ) {
> echo($k . " = " . $v . "\n");
> }
> }
>
> I didn't write much PHP lately, so sorry if there is some syntax (or
> any other) error here.
>
>

Worth a try but it produces the same result. It seems you can't pass the
array name in a string at all from what I can see.

tony

 

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

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