Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/vim/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在php代码中获取值feild[ID]stdClass对象_Php_Stdclass - Fatal编程技术网

如何在php代码中获取值feild[ID]stdClass对象

如何在php代码中获取值feild[ID]stdClass对象,php,stdclass,Php,Stdclass,如何在php代码中获取值feild[id] stdClass Object ( [List_inserted] => Array ( [0] => stdClass Object ( [ID] => 145001 [value] => 40 ) ) [Sucssess] => 1 [ErrorMassage] => OK ) 您没有给我们提供stdClass的名称,所以我假设它是$stdClass $stdClass->List\u插入[0]->ID 让我

如何在php代码中获取值
feild[id]

stdClass Object ( [List_inserted] => Array ( [0] => stdClass Object ( [ID] => 145001 [value] => 40 ) ) [Sucssess] => 1 [ErrorMassage] => OK ) 

您没有给我们提供
stdClass
的名称,所以我假设它是$stdClass

$stdClass->List\u插入[0]->ID

让我们把它分解

stdClass对象([List\u inserted]=>Array([0]=>stdClass对象([ID]=>145001[value]=>40))[successs]=>1[error按摩]=>OK)

我们使用
->
访问对象,使用
[]

访问数组 第一部分告诉我们它是一个物体,所以它是

$stdClass->List\u已插入

由于
=>数组
,插入的列表是一个数组。我们可以使用[0]访问此文件

$stdClass->List\u插入[0]

好的,List_inserted[0]是一个对象,也谢谢
[0]=>stdClass对象
;你想访问身份证?所以我们需要另一个
->


$stdClass->List\u inserted[0]->ID

您做了哪些努力?你能告诉我们你的努力是无效的吗?因为它的$obj->List_插入了[0]->ID