我无法让这个 php 代码的语法工作


I can not get the syntax of this php code to work

$_SESSION[{'''testingrecord'.$testingrecordsfec.''''}]

这原本是这样的

${'testingrecord'.$testingrecordsfec}

但我需要将此处创建的变量添加到全局变量 $_SESSION

此变量是为数组中的每个项创建的。

$testingrecord0
$testingrecord1
$testingrecord2

删除{}''

$_SESSION['testingrecord'.$testingrecordsfec];

$_SESSION就像任何其他数组一样,键可以是导致字符串或整数的任何表达式。