如何结合两个变量的结果来回显另一个变量? [英] how to combine the results of two variables to echo another variable?

查看:60
本文介绍了如何结合两个变量的结果来回显另一个变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我是一个PHP新手,所以请耐心等待。


这是我想要做的:


$ foobar =" blah blah";

$ a =" foo";

$ b =" bar" ;

$ fooboo =" $ a" 。 $ b;

echo $ fooboo


我知道我的语法不正确所以我正在寻找功能

使$ fooboo回显$ foobar变量blah blah,而不是

" foobar"。


任何帮助表示赞赏。

Hello,
I''m a somewhat PHP newbie, so please bear with me.

Here is what I am trying to do:

$foobar = "blah blah";
$a = "foo";
$b = "bar";
$fooboo = "$a" . "$b";
echo $fooboo

I know my syntax here is not correct so I am looking for the function
to make $fooboo echo out the $foobar variable "blah blah", and not as
"foobar".

Any help is appreciated.

推荐答案

foobar =" blah blah";
foobar = "blah blah";


a =" foo";
a = "foo";


b =" bar";
b = "bar";


这篇关于如何结合两个变量的结果来回显另一个变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆