Hi
I’m stuck, i am still learning php and at a sort of basic + level, everything i want to do is always new!,
I have two arrays
array 1
$id =
0=>123,
1=>53,
2=>92,
more random numbers (as many as in $geo.
array 2 or what i think is an array…
$geo = "
47.469554,8.307432,Ländliweg 7 5400 Baden,-,
47.390593,8.045777,Aargauerplatz 5000 Aarau,-,
47.392025,8.050795,Bahnhofplatz 5000 Aarau,-,
47.504878,8.019072,Schulstrasse 22 5070 Frick,-,"
$geo = explode (",-,", $geo);
foreach ($geo as $key => $value) {
list($lat, $lon, $add) = explode(",",$value);
// this works i get a list of lats and longs
foreach($geo as $key => $value) {
echo " “. $lat .” “. $lon .”
";
}
I want a final array, array3 that combines the two arrays $id and elements of $geo ($lat and $lon)
id lat lon (123 47.469554 8.307432)
id lat lon (53 47.390593 8.045777)
id lat lon (92 47.392025 8.019072)
ive searched various keywords merge concatenate, push, combine but of all the pages and pages i have read i havnt found anything that works the way i want it to. it should be easy ! but i just dont get the result i want!
Can anyone help?
Thanks a lot Cath