I’m wanting to display the address, but exclude the zip code. Google maps address string looks like this: 3658 NW Camas Meadows Dr, Camas, WA 98607. I’m not sure how to isolate the postal code since it isn’t separated by a comma. Any ideas? Here’s my code:
<?php $address = get_field('address'); ?>
<address class="street-address">
<?php $location = explode( "," , $address['address']);
echo $location[0].', '; //street number
echo $location[1].','.$location[2]; //city, state
?>
</address>