gpt4 book ai didi

php - Javascript 相当于 PHP 的 $$varName

转载 作者:可可西里 更新时间:2023-11-01 13:15:44 26 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
How to access javascript variable value by creating another variable via concatenation?

在 PHP 中我可以:

$theVariable = "bigToe";
$bigToe = "is broken";

这样:

echo "my ".$theVariable." ".$$theVariable;

会显示

my bigToe is broken

我将如何着手做一些类似于 JavaScript 的事情?

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com