I am in a bit of a pickle, I have all these different combinations of NAME's coming into the system, and need to extract a salutation from them. but haven't found a way to do it so it gets them all. Here is a list of the different NAME's:
SAXTON, MIKE
GLORIA E SCHWAAB
SONJA JOHNSON
ROEPKE,DEANN LOUISE
NETTLES,RONALD
FLOISTAD, JOHN ALAN
SHARFF,CAROLE J
A H HERMEL CO
KENT'S KAR'S
SUMMIT MOTORS COMPANY
. TEDS SERVICE
0 PEDRO CAFE
AUTOMOTIVE RENTALS INC
THE PROCTER & GAMBLE DIST CO
PROJECT CHILDSAFE
KUEHN RENTAL,LLC
I have been using these but the include the middle names, and if it's a company they don't come correctly.
$nameStr = $row1["CUSTOMERNAME"];
list($firstPart,$secondPart)=explode(',', $nameStr);
$nameStr = $row1["CUSTOMERNAME"];
list($firstPart,$secondPart)=explode(' ', $nameStr);
Thanks for any help.