标签: php constants variable-names
define ("HELLO", "hello-you"); $var_HELLO = "something"; echo $var_HELLO;
其中变量名中的HELLO是定义的常量。
答案 0 :(得分:4)
如果你绝对必须这样做,
define ("HELLO", "hello-you"); $var_{HELLO} = "something"; echo $var_{HELLO};