PHP code example of d3vy / address-parser

1. Go to this page and download the library: Download d3vy/address-parser 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/ */

    

d3vy / address-parser example snippets


$locale = 'HU';
$parser = new \sbolch\AddressParser\Parser($locale);

$parser->parse('1152 Budapest, Szentmihályi út 167');

/*
This returns:
Array
(
    [zip] => 1152
    [city] => Budapest
    [street] => Szentmihályi
    [streetType] => út
    [houseNumber] => 167
    [houseNumberInfo] =>
)
*/