Philly_C
asked on
Initial capitalization of strings in PHP
I've got someone's first name in a string, and I'd like to do two things:
1. Make sure that it's capitalized properly: Joe, not JOE, joe, JOe, jOe, etc.
2. Strip any titles (and the titles may be in any permutation of lower/uppercase letters, and may or may not be punctuated: Dr, Mr, Mrs, Ms, and all the variations of those.
Are there functions I can use to do this?
Thanks!
1. Make sure that it's capitalized properly: Joe, not JOE, joe, JOe, jOe, etc.
2. Strip any titles (and the titles may be in any permutation of lower/uppercase letters, and may or may not be punctuated: Dr, Mr, Mrs, Ms, and all the variations of those.
Are there functions I can use to do this?
Thanks!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Good catch, Brian. You are exactly right.