I have an array of coordinates that I have extracted from JSON. Only issue I have is each index has a part of each set of coordinates. If this sounds confusing let me explain further. So basically for usage on google maps you have two parts to each set of coordinates usually separated by a comma i.e. 50.192847,-0.837228 (just an example). Problem I've got is somehow the two parts have ended up in different indexes for example:
array[0] = '50.192847'
array[1] = '-0.837228'
array[2] = '53.998772'
array[3] = '2.337622'
I think you get the idea. So my question is how do I combine each pair of indexes to make up each set of coordinates? So again for example combine array[0] and array[1] together. Is there a loop that can do this or a PHP array function of some sort?
Thanks in advance for the help!