PHP code example of itssonu / lat-long

1. Go to this page and download the library: Download itssonu/lat-long library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

itssonu / lat-long example snippets

 
use itssonu\LatLong;
 
$latLong = new LatLong;
 
$address = "clock tower ludhiana punjab";

$result = $latLong->getLatLong($address);
$lat = $result->lat;
$long = $result->long;

$lat = $latLong->getLat($address);

$long = $latLong->getLong($address);