如何将数组名称传递给函数参数? [英] How to pass array names to function parameters ?

查看:87
本文介绍了如何将数组名称传递给函数参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我试图通过一个包含

全局数组名称的数组进行迭代


例如:


$ myarray = array(" \ $ _GET"," \ $ _SERVER");


我遇到的问题是调用函数

myfunction($ myarray [0]);


似乎没有以我可以使用的方式传递数组名称。


我确定我在这里找不到简单的东西可以请帮助?


tony


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

推荐答案

myarray = array(" \
myarray = array("\

_GET"," \
_GET", "\


_SERVER");


我遇到的问题是调用函数


myfunction(
_SERVER"); and so on

The problem Im having is calling a function with

myfunction(


这篇关于如何将数组名称传递给函数参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆