public static function dataTrensform($trArr) { $trData = array(); for ($i = 0; $i < count($trArr); $i++) { $trId = $trArr[$i]['id']; $hop = $trArr[$i]['hop']; $ip = $trArr[$i]['ip_addr']; /* $lat = $trArr[$i]['mm_lat']; $long = $trArr[$i]['mm_long']; */ $lat = $trArr[$i]['lat']; $long = $trArr[$i]['long']; $num = $trArr[$i]['num']; $name = $trArr[$i]['name']; $trData[$trId][] = array($ip, $hop, $lat, $long, $trId, $num, $name); } // end for unset($trArr); Traceroute::generatePolylineObject($trData); unset($trData); /* echo '<hr/><textarea>'; print_r($trData); echo '</textarea>'; */ }