Hello Everyone ! How to split each array to own variable and display that variable separately . I got code from IP API provider to display user's location,
include 'ip2locationlite.class.php';
$ipLite = new ip2location_lite;
$ipLite->setKey('c86c104532b5466bda7620b48e20b10ca53ad9070b8cc52b5a5d90a6e57b9bb3');
$locations = $ipLite->getCity($_SERVER['REMOTE_ADDR']);
$errors = $ipLite->getError();
echo "<strong>First result</strong><br />\n";
echo count($locations);
echo '<br><br>';
foreach ($locations as $field => $val)
{
echo $field . ' : ' . $val . "<br />\n";
}
echo '<br><br>';
Visit This Example
Nw how to seperate each array to each variables ?