First, we give a piece of code:
<?php
$a = 'abc';
$$a = '789';
echo $abc;
?>
The result is shown in the figure:
##Explanation:
$a ='abc';
$$a can be understood as parsing the following $a first, then parsing it, and finally parsing it into $abc
So directly printing $abc is a variable , it prints out as 789
For more related PHP issues, please visit the PHP Chinese website:
php video tutorial
The above is the detailed content of What does $$ mean in PHP?. For more information, please follow other related articles on the PHP Chinese website!
Statement: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