PHP code example of michalsn / australian-address-parser

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

    

michalsn / australian-address-parser example snippets


// calling
$parser = new \Michalsn\AustralianAddressParser\Parser();
$result = $parser->parse('1/55 Rutherford St, Stafford Heights Queensland');

// will return 
[
	'state' => 'QLD',
	'suburb' => 'Stafford Heights',
	'postcode' => '4053',
	'streetType' => 'Street',
	'unitNumber' => '1',
	'streetNumber' => '55',
	'streetName' => 'Rutherford',
]