if (is_array($jsonhome)) {
foreach ($jsonhome as $query) {
foreach ($query['results']['place'] as $places) {
if (is_array($places['country'])) {
echo "Country:
";
echo "Content: " . $places['country']['content'] . "
";
}
if (is_array($places['admin1'])) {
echo "State:
";
echo "Content: " . $places['admin1']['content'] . "
";
}
if (is_array($places['admin2'])) {
echo "District/City:
";
echo "Content: " . $places['admin2']['content'] . "
";
}
}
}
}
$location_data['user_current_country'] = $places['country']['content'];
$this->load->view('header_register', $location_data);
$this->load->view('body_complete_register', $location_data);
$this->load->view('footer_register');
I want to transfer the country to input type select in the view codeigniter:
Say i get two countries via the above queries say India and USA i want to pass it to the view
Do i do it via ajax?
Please help i am new to codeigniter