我在PHP53上,所以代码为1.8
$response = (array)$I->grabDataFromJsonResponse("result");
\Codeception\Util\Debug::debug($response);
Array
(
[*position] => 0
[*val] => Array
(
[key1] => 10
[key2] => 1
)
[*assocArray] => 1
)
现在,当我尝试访问数组中的值时,它会给出错误
\Codeception\Util\Debug::debug($response['key1']);
[ErrorException] Undefined index: key1
答案 0 :(得分:1)