Skip to content

zipcode_info_get ​

php
array zipcode_info_get ( string $kod )

Returns an array with town/city and province information for the postal code $kod. The argument uses the format 'XX;CCCCC', where X represents a country-code letter and C represents a postal-code digit. Returns false on failure.

Example:

php
$get_info = zipcode_info_get('PL;44-200');
print_r($get_info);

$get_info2 = zipcode_info_get('DE;01067');
print_r($get_info2);

Result:

Array
(
    [code] => PL;44-200
    [city] => Rybnik
    [state] => śląskie
)
Array
(
    [code] => DE;01067
    [city] => Dresden
    [state] => Sachsen
)