作者:乐韵答题 | 2023-09-05 17:10
我知道在php中你可以在变量中嵌入变量,比如:
$var1 = "I\'m including {$var2} in this variable.."; ?>
但我想知道如何,以及是否可以在变量中包含一个函数.我知道我可以写:
但是如果我有一个很长的变量输出,我不想每次都这样做,或者我想使用多个函数:
AAAHHHHH
There is alot of text and html here... but I want some functions!
-somefunc() doesn't work
-{somefunc()} doesn't work
-$somefunc() and {$somefunc()} doesn't work of course because a function needs to be a string
-more non-working: ${somefunc()}