如何在字符串中运行PHP代码? [英] how to run php code within string?
本文介绍了如何在字符串中运行PHP代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
$ a =" my result =<?= 2 + 2?>"
echo $ a
我想得到:我的结果= 4;
怎么写这个剧本?
欢迎任何评论...
谢谢。
$a="my result=<?=2+2?>"
echo $a
I want to get :my result=4;
how to write this script?
any comments are welcome...
thanks.
推荐答案
a
我想得到:我的结果= 4;
怎么写这个剧本?
欢迎任何评论...
谢谢。
a
I want to get :my result=4;
how to write this script?
any comments are welcome...
thanks.
Ju Hui写道:
a =" my result =<?= 2 + 2?>" ;
echo
a="my result=<?=2+2?>"
echo
这篇关于如何在字符串中运行PHP代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文