php-PHP如何在echo输出时,再解析变量?

WBOY
Release: 2016-06-02 11:28:48
Original
1171 people have browsed it

php

举个栗子吧:
$a="abc{$xxx}abc";
$xxx="666";
echo $a;
?>
以上代码不成立,不能得到预期的"abc666abc"
检查代码后,个人认为是变量"$xxx"在第一行就已经被解析了,
但是在第一行"$xxx"没有定义,所以得不到值
如何让变量在输出时再解析这个"$xxx"变量,得到这个"abc666abc"呢?

在线等,希望路过的大神不要吝啬赐教,在下感激不禁!

Related labels:
php
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!