【发布时间】:2019-05-25 14:03:49
【问题描述】:
你能帮帮我吗?我需要知道如何使用 PHP 从 API 调用访问此响应的值。
Array ( [queryIds] => Array ( [0] => lHLLapn7EH ) [timedOutRealtimeData] => [realtimeDataMissing] => [cacheFreshness] => FRESH [prunedResult] => [novaCost] => 0 [novaRequestDuration] = > 19 [wasCached] => 1 [minSampleRate] => 1 [timeComputed] => 1558794556710 [novaRuntime] => 199 [hitChunkGroupByLimit] => [throttleTime] => 0 [data] => Array ([series] => Array ( [0] => 数组 ( [0] => 数组 ( [setId] => [value] => 843 ) ) [1] => 数组 ( [0] => 数组 ( [setId] => [value] => 22 ) ) ) [seriesLabels] => 数组 ( [0] => 数组 ( [0] => 0 [1] => C5241; GB ) [1] => 数组 ( [0] => 0 [1 ] => C9999; GB ) ) [seriesMeta] => 数组 ( [0] => 数组 ( [eventGroupBys] => 数组 ( [0] => C5241 [1] => GB ) [segmentIndex] => 0 [eventIndex ] => 0 [eventGroupBy] => C5241; GB ) [1] => 数组 ( [eventGroupBys] => 数组 ( [0] => C9999 [1] => GB ) [segmentIndex] => 0 [eventIndex] = > 0 [eventGroupBy] => C9999; GB ) ) [seriesCollapsed] => 数组 ( [0] => 数组 ( [0] => 数组 ( [setId] => [value] => 843 ) ) [1] = > 阵列( [0] => 数组 ( [setId] => [value] => 22 ) ) [xValues] => 数组 ( [0] => 2019-05-25 ) ) [partialMergedAndNewUserInformation] => [transformationIds] = > 数组 ( [0] => 2696 ) [后端] => novaV2 )
【问题讨论】:
-
你需要哪个索引值?
-
如果没有看到更复杂的数据版本,没有人可以真正给出一个保证在您拥有该数据时有效的答案。您的数据中还有两个
Array ( [0] => C9999 [1] => GB ),因此不清楚您想要哪个。 -
我需要这个 Array ( [0] => C9999 [1] => GB ) , [xValues] => Array ( [0] => 2019-05-25and 我需要 Array ( [ setId] => [value] => 20,问题是这在某些时候很简单,我会像其中许多一样,我需要知道如何访问它们以将它们发送到数据库,我需要一个循环,我可以获得符合数组的代码 C#### 将会增长。