The examples in this article describe the definition and use of php dynamic variables. Share it with everyone for your reference. The details are as follows:
<?php $var_name = "ic"; //定义变量$var_name $$var_name = "This is Simon"; //使用$var_name的值作为这个变量的变量名 echo $var_name."<BR>"; //输出$var_name,即变量名 echo $$var_name."<BR>"; //输出变量的值 echo $ic."<BR>"; //使用这个方法可以实现同样的变量调用 ?>
I hope this article will be helpful to everyone’s PHP programming design.