Home > Backend Development > PHP Tutorial > php的代码输出问

php的代码输出问

WBOY
Release: 2016-06-23 13:19:49
Original
878 people have browsed it

假设 
$alipay = '支付宝';
$b = 'alipay';

echo $$b;  却不能输出支付宝 该怎么输出?


回复讨论(解决方案)

我这里能输出,你的php版本是多少?

或者试试 echo ${$b};

目测写法没有问题

$alipay = '支付宝';$b = 'alipay';echo $$b;
Copy after login

我的正常,没问题。

我的也正常,没有问题。

我擦 正常的 

Related labels:
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template