Virendra Posted February 24, 2021 Share Posted February 24, 2021 Array ( [data] => Array ( [0] => Array ( [latitude] => 22.934566 [longitude] => 79.08728 [type] => county [distance] => 44.328 [name] => Narsinghpur [number] => [postal_code] => [street] => [confidence] => 0.5 [region] => Madhya Pradesh [region_code] => MP [county] => Narsinghpur [locality] => [administrative_area] => [neighbourhood] => [country] => India [country_code] => IND [continent] => Asia [label] => Narsinghpur, India ) ) ) Please Help ! Thanks in Advance Quote Link to comment https://forums.phpfreaks.com/topic/312212-how-to-insert-this-data-into-mysql-using-php/ Share on other sites More sharing options...
Barand Posted February 24, 2021 Share Posted February 24, 2021 0 out of 10 for formatting. What have you tried so far? What was the outcome? Quote Link to comment https://forums.phpfreaks.com/topic/312212-how-to-insert-this-data-into-mysql-using-php/#findComment-1584761 Share on other sites More sharing options...
Barand Posted February 24, 2021 Share Posted February 24, 2021 This should get you started (if you haven't already) ... $array = array ( 'data' => array ( '0' => array ( 'latitude' => 22.934566, 'longitude' => 79.08728, 'type' => 'county', 'distance' => 44.328, 'name' => 'Narsinghpur', 'number' => '', 'postal_code' => '', 'street' => '', 'confidence' => 0.5, 'region' => 'Madhya Pradesh', 'region_code' => 'MP', 'county' => 'Narsinghpur', 'locality' => '', 'administrative_area' => '', 'neighbourhood' => '', 'country' => 'India', 'country_code' => 'IND', 'continent' => 'Asia', 'label' => 'Narsinghpur, India' ) ) ); foreach ($array['data'] as $record) { // insert $record } Quote Link to comment https://forums.phpfreaks.com/topic/312212-how-to-insert-this-data-into-mysql-using-php/#findComment-1584762 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.