How to add a postal address

I am using the ACF fields plugin to add fields to a WP site, but I am struggling with how to include the address.

I have the following fields:

$addr1
$addr2
$town_or_city
$county
$postcode

addr1 and addr2 may or may not be included, according to the address provided. Usually it is only addr2 that is not needed, but I want to output the full address, comma delimited, but excluding addr1 or addr2 when they are not included. Any help would be appreciated.

Sponsor our Newsletter | Privacy Policy | Terms of Service