1

The question is related to rearranging a list of coordinates within list of pair while running a php code simultaneously. I am new with php language and managed somehow to parse a kml file in php. The file came out with the following output:

Endeavour Hills
145.2355671,-37.9742105 145.2353525,-37.9749209 145.2343225,-37.9789804 
Narre Warren
145.2355671,-37.9742105 145.2353525,-37.9749209 145.2343225,-37.9789804 
Cranbourne
145.2355671,-37.9742105 145.2353525,-37.9749209 145.2343225,-37.9789804

(There were more coordinates for each records and I tried to keep it concise)

So my code could parse the coordinates from kml file. But I wanted the coordinates get rearranged simultaneously during the code run. For example it should look like following.

Endeavour Hills
145.2355671,-37.9742105 
145.2353525,-37.9749209 
145.2343225,-37.9789804 
Narre Warren
145.2355671,-37.9742105 
145.2353525,-37.9749209 
145.2343225,-37.9789804 
Cranbourne
145.2355671,-37.9742105
145.2353525,-37.9749209
145.2343225,-37.9789804

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.