我在对象中有输出
看起来如下,
stdClass Object
(
[0] => stdClass Object
(
[id] => 14
[tcaseid] => 11
[step] => a
[teststep] => a
[expected_data] => a
[actual_result] => a
[pass_fail] => 1
[notes] => a
)
[1] => stdClass Object
(
[id] => 15
[tcaseid] => 11
[step] => b
[teststep] => b
[expected_data] => b
[actual_result] => b
[pass_fail] => 1
[notes] => b
)
[2] => stdClass Object
(
[id] => 16
[tcaseid] => 11
[step] => d
[teststep] => d
[expected_data] => d
[actual_result] => d
[pass_fail] => 1
[notes] => d
)
[3] => stdClass Object
(
[id] => 17
[tcaseid] => 11
[step] => e
[teststep] => e
[expected_data] => e
[actual_result] => e
[pass_fail] => 1
[notes] => e
)
[id] => 11
[project_id] => 1
[title] => title
[description] => desc
[module_id] => 1
[usecaseid] => 1
[tcaseid] => 5
)
我的问题是如何获得此值( [id] => 11 )
我试过了
* $data->id
* $data['id'];
任何帮助?
答案 0 :(得分:1)