Hi, I am working to convert street address which is all upper case into mixed case so they look good. One problem I encounter is that apartment number like "5R" which I want to keep it "5R" but for "3RD STREET", I would like to convert it to "3rd Street". I first convert all address to lower case then capitalize the first word using all php standard function. Then find the one like "5xxxxx" and convert them back to upper case. But this turns "3rd" to "3RD" which is not what I want. My code is followed. I need suggestion to modify the code or a different way to handle the situation. Thanks for any help in advance. if (preg_match( "/^[1-9][0-9a-zA-Z]+/", $address_element[$j], $matches)){ $address_element[$j] = strtoupper($address_element[$j]); }