php动态变量定义及使用,php动态变量
本文实例讲述了php动态变量定义及使用方法。分享给大家供大家参考。具体如下:
<?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>"; //使用这个方法可以实现同样的变量调用 ?>
希望本文所述对大家的php程序设计有所帮助。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Dreamweaver CS6
Visual web development tools

WebStorm Mac version
Useful JavaScript development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Notepad++7.3.1
Easy-to-use and free code editor