PHP code example of jflight / nearby-uk-postcode-finder

1. Go to this page and download the library: Download jflight/nearby-uk-postcode-finder 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/ */

    

jflight / nearby-uk-postcode-finder example snippets


$postcode = new Jflight\PostcodeFinder\UkPostcode('CF11');

$nearbyPostcodes = $postcode->findNearestPostcodes(10)); // Array of postcodes



class NewPostcode extends Jflight\PostcodeFinder\Postcode {
    protected $file = "/path/to/csv.csv";
}