Home > php教程 > php手册 > php $$是什么意思

php $$是什么意思

WBOY
Release: 2016-06-13 09:53:45
Original
1171 people have browsed it

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的值作为变量名!
比如:

 
<font face="新宋体">$name = 'blueidea';<br> $$name 就相当于  $blueidea</font>
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template