Splitting a string of coordinates into an x array and y array.
I'm working on a site where a little bit of geolocation is involved and what I'm trying to do is convert a string of coordinates:
(-35.01200165057613, 138.48046898164057)(-34.84423947483729, 138.46398948945307)(-34.813802923579594, 138.72491478242182)(-35.006377611621886, 138.71530174531244)
into two arrays of lat and long ie:
$lat = array(-35.01200165057613, -34.84423947483729, -34.813802923579594, -35.006377611621886); $lng = array( 138.48046898164057, 138.46398948945307, 138.72491478242182, 138.71530174531244);
I've been looking through the php.net manuals for a good hour or so and I am stuck on how to do it. If anyone can point me to any tutorials which might be useful that would be great.