|
楼主 |
发表于 2017-10-12 18:01:03
|
显示全部楼层
我获取到数据,并且转换成数组了,我该怎么获取它单独的元素数据:
这是我获取的数据- Array ( [date] => 20171012 [message] => Success ! [status] => 200 [city] => 南阳 [count] => 24 [data] => Array ( [shidu] => 69% [pm25] => 9 [pm10] => 26 [quality] => 优 [wendu] => 14 [ganmao] => 各类人群可自由活动 [yesterday] => Array ( [date] => 11日星期三 [sunrise] => 06:30 [high] => 高温 13.0℃ [low] => 低温 11.0℃ [sunset] => 18:03 [aqi] => 29 [fx] => 北风 [fl] => 3-4级 [type] => 大雨 [notice] => 请尽量避免出门 ) [forecast] => Array ( [0] => Array ( [date] => 12日星期四 [sunrise] => 06:31 [high] => 高温 16.0℃ [low] => 低温 11.0℃ [sunset] => 18:01 [aqi] => 34 [fx] => 无持续风向 [fl] => <3级 [type] => 阴 [notice] => 灰蒙蒙的天空就像模糊了的眼睛 ) [1] => Array ( [date] => 13日星期五 [sunrise] => 06:31 [high] => 高温 18.0℃ [low] => 低温 13.0℃ [sunset] => 18:00 [aqi] => 57 [fx] => 无持续风向 [fl] => <3级 [type] => 阴 [notice] => 灰蒙蒙的天空就像模糊了的眼睛 ) [2] => Array ( [date] => 14日星期六 [sunrise] => 06:32 [high] => 高温 16.0℃ [low] => 低温 13.0℃ [sunset] => 17:59 [aqi] => 65 [fx] => 无持续风向 [fl] => <3级 [type] => 小雨 [notice] => 外出时请注意关好门窗,防止雨水飘入 ) [3] => Array ( [date] => 15日星期日 [sunrise] => 06:33 [high] => 高温 16.0℃ [low] => 低温 13.0℃ [sunset] => 17:58 [aqi] => 62 [fx] => 无持续风向 [fl] => <3级 [type] => 中雨 [notice] => 今日中雨,出门请带好雨具 ) [4] => Array ( [date] => 16日星期一 [sunrise] => 06:34 [high] => 高温 16.0℃ [low] => 低温 12.0℃ [sunset] => 17:57 [aqi] => 42 [fx] => 无持续风向 [fl] => <3级 [type] => 小雨 [notice] => 下雨了不要紧,撑伞挡挡就行 ) ) ) )
复制代码 |
|