Address Helper for CakePHP

I’ve released the first official version of my Address plugin for CakePHP 2.x today. It provides an Address helper for formatting an array of address fields.

For example:-

$data['CustomerAddress'] = array(
    'house_number' => '221B',
    'address_line_1' => 'Baker Street',
    'city' => 'London',
    'postcode' => 'NW1 6XE'
echo $this->Address->format($data['CustomerAddress']);

This will output:-

<address>221B Baker Street<br />Marylebone<br />London<br />NW1 6XE</address>

More details of what you can do with the helper can be found on the plugin’s page.

Related Content

Published on