David Preston

Musings of an old bloke.



PHP

Posts 1 to 1 of 1

Tidying & Formatting Postal Addresses in PHP

A couple of times in the course of my job, I've needed to tidy-up user input of postal addresses, usually when importing from an external database into a web application or taking input from a web form. It looks horrible when everything is in upper or lower case. PHP has strtoupper(), strtolower() and ucasewords() functions, but none of these does just what I needed. Googling found a few attempts to solve the same problem, and I've probably… View More