我是php的初学者。 该文档是mongodb查询的结果。
Array ( [_id] => MongoId Object ( [$id] => 55e994585bab8c0a816e0693 ) [metadata] => Array ( [timestamp] => 1441371224596 ) [message] => Array ( [itsPduHeader] => Array ( [messageID] => 1 [protocolVersion] => 1 [stationId] => 33000 ) [denm] => Array ( [managementContainer] => Array ( [relevanceDistance] => 3 [referenceTime] => 363373455171 [stationType] => 15 [actionID] => Array ( [sequenceNumber] => 69 [orignatorStationID] => 33000 ) [detectionTime] => 363373438142 [eventPosition] => Array ( [altitude] => Array ( [altitudeValue] => 0 [altitudeConfidence] => 15 ) [posConfidenceEllipse] => Array ( [semiMajorOrientation] => 3601 [semiMinorConfidence] => 4095 [semiMajorConfidence] => 4095 ) [latitude] => 448848419 [longitude] => -5615145 ) ) [situationContainer] => Array ( [informationQuality] => 0 [eventType] => Array ( [subCauseCodeType] => 0 [causeCodeType] => 1 ) ) [locationContainer] => Array ( [traces] => Array ( [0] => Array ( [0] => Array ( [pathPosition] => Array ( [deltaAltitude] => 0 [deltaLongitude] => 0 [deltaLatitude] => 0 ) ) ) ) ) ) ) )
但我无法获得纬度和经度的价值。 有人能帮助我吗?
答案 0 :(得分:0)
尝试:
$result = array();
echo $result['message']['denm']['managementContainer']['eventPosition']['latitude'];
echo $result['message']['denm']['managementContainer']['eventPosition']['longitude'];