Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
只是一个关于语法的简单问题。简化:
$testme[0] = "hello"; $v = "me"; echo $test{$v}[0]; //expect this to output "hello"
有什么办法可以写出上面的最后一行,使变量引用“我”?
谢谢!
采用
echo ${'test' . $v}[0];
反而