PHP头条
热点:

php $$是什么意思


foreach(array('_COOKIE', '_POST', '_GET') as $_request) {
       foreach($$_request as $_key => $_value) {
              $_key{0} != '_' && $$_key = daddslashes($_value);
       }
}
$_request是PHP的一个内置变量吧?$$_request是什么意思

 

大写的才是PHP的超级全局变量
$_REQUEST
上面的代码里$_request 是一个普通变量

$$_request 的意思就是 用 $_request的值作为变量名!
比如:

 
$name = 'blueidea';
$$name 就相当于  $blueidea

www.phpzy.comtrue/php/29251.htmlTechArticlephp $$是什么意思 foreach(array('_COOKIE', '_POST', '_GET') as $_request) { foreach($$_request as $_key = $_value) { $_key{0} != '_' $$_key = daddslashes($_value); } } $_request是PHP的一个内置变量吧?$$_request是什么意思 大...

相关文章

    暂无相关文章

PHP之友评论

今天推荐