我对PHP53所以codeception 1.8访问阵列值
$response = (array)$I->grabDataFromJsonResponse("result");
\Codeception\Util\Debug::debug($response);
Array
(
[*position] => 0
[*val] => Array
(
[key1] => 10
[key2] => 1
)
[*assocArray] => 1
)
现在,当我试图访问它给数组中的值Me错误
\Codeception\Util\Debug::debug($response['key1']);
[ErrorException] Undefined index: key1
理所应当的。试试'\ Codeception \ Util \ Debug :: debug($ response ['* val'] ['key1']);' – Calimero
@Calimero我试过了,说“Undefined index:* val”如何获取值? – SoulMan
$ response [0] ['* val'] ['key1'] –