<?php
'email' => 'user@example.com',
'name' => 'Super User',
'billing' => 'Street 1',
'delivery' => 'Street 2'
)
),
'post' => 'Hello, World!'
);
function flatten($array, $prefix = '') {
foreach($array as $key=>$value) {
$result = $result + flatten($value, $prefix . $key . '.');
}
else {
$result[$prefix.$key] = $value;
}
}
return $result;
}
PD9waHAKCiRkYXRhID0gYXJyYXkoCiAgICAndXNlcicgPT4gYXJyYXkoCiAgICAgICAgJ2VtYWlsJyAgID0+ICd1c2VyQGV4YW1wbGUuY29tJywKICAgICAgICAnbmFtZScgICAgPT4gJ1N1cGVyIFVzZXInLAogICAgICAgICdhZGRyZXNzJyA9PiBhcnJheSgKICAgICAgICAgICAgJ2JpbGxpbmcnID0+ICdTdHJlZXQgMScsCiAgICAgICAgICAgICdkZWxpdmVyeScgPT4gJ1N0cmVldCAyJwogICAgICAgICkKICAgICksCiAgICAncG9zdCcgPT4gJ0hlbGxvLCBXb3JsZCEnCik7CgpmdW5jdGlvbiBmbGF0dGVuKCRhcnJheSwgJHByZWZpeCA9ICcnKSB7CiAgICAkcmVzdWx0ID0gYXJyYXkoKTsKICAgIGZvcmVhY2goJGFycmF5IGFzICRrZXk9PiR2YWx1ZSkgewogICAgICAgIGlmKGlzX2FycmF5KCR2YWx1ZSkpIHsKICAgICAgICAgICAgJHJlc3VsdCA9ICRyZXN1bHQgKyBmbGF0dGVuKCR2YWx1ZSwgJHByZWZpeCAuICRrZXkgLiAnLicpOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgJHJlc3VsdFskcHJlZml4LiRrZXldID0gJHZhbHVlOwogICAgICAgIH0KICAgIH0KICAgIHJldHVybiAkcmVzdWx0Owp9CgpwcmludF9yKGZsYXR0ZW4oJGRhdGEpKTs=