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 Scott on 04/15/06 18:54

On Sat, 2006-04-15 at 12:26 +0000, tony@tony.com wrote:
> i'm trying to itterate through an array that contains the names of the
> global arrays
>
> eg:
>
> $myarray = array("\$_GET", "\$_SERVER"); and so on
>
> The problem Im having is calling a function with
>
> myfunction($myarray[0]);
>
> doesnt seem to pass the array name in a manner I can then use.
>
> I'm sure I'm missing something simple here can anyonehelp please ?
>
> tony

That should pass the name of the global array. You could also use single
quotes and drop the escape character:

$myarray = array('$_GET, '$_SERVER');

Are you sure the problem isn't in your function? What are you doing
with the name once your function receives it?

Scott

 

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

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