私は2つの配列を持っています。多次元配列1つの配列のキー値をPHPの別の配列に
最初の配列:
Array
(
[0] => Array
(
[0] => 17, karol Bagh
[1] => Noida
[2] => Delhi
[3] => India
[4] => 426001
)
[1] => Array
(
[0] => 117, Srinagar
[1] => Gaziabad
[2] => Delhi
[3] => India
[4] => 426001
)
[2] => Array
(
[0] => 109,Bangalore
[1] => Bangalore
[2] => Karnataka
[3] => India
[4] => 560058
)
[3] => Array
(
[0] => Jeevan Shree Building, Ground Floor,S.No.1109, Ganeshkhind Road, Shivajinagar, Near Pune Central
[1] => Pune
[2] => Maharashtra
[3] => India
[4] => 411005
)
)
二番目の配列:
Array
(
[0] => Array
(
[LatitudeLongitude] => 28.6192015, 77.2791726
)
[1] => Array
(
[LatitudeLongitude] => 28.5615316, 77.268723
)
[2] => Array
(
[LatitudeLongitude] => 13.0525001, 77.4869828
)
[3] => Array
(
[LatitudeLongitude] => 18.5204303, 73.8567437
)
)
私はPHPで、この2列の組み合わせによってのような配列が必要
:
Array
(
[0] => Array
(
[0] => 17, karol Bagh
[1] => Noida
[2] => Delhi
[3] => India
[4] => 426001
**[5] => 28.6192015, 77.2791726**
)
[1] => Array
(
[0] => 117, Srinagar
[1] => Gaziabad
[2] => Delhi
[3] => India
[4] => 426001
**[5] => 28.5615316, 77.268723**
)
[2] => Array
(
[0] => 109,Bangalore
[1] => Bangalore
[2] => Karnataka
[3] => India
[4] => 560058
**[5] => 13.0525001, 77.4869828**
)
[3] => Array
(
[0] => Jeevan Shree Building, Ground Floor,S.No.1109, Ganeshkhind Road, Shivajinagar, Near Pune Central
[1] => Pune
[2] => Maharashtra
[3] => India
[4] => 411005
**[5] => 18.5204303, 73.8567437**
)
)
どのように行うにはこの?
私はこれを次のように行っています。 $ index = 0; ($ index = 0; $ index <$ id; $ index ++){ $ propertyList ['latitutelongitute'] = $ latlongarray [$ index]; } –