Msg#: 4033999 posted 1:53 pm on Nov 30, 2009 (gmt 0)
i have a variable called $full_names
if i echo this variable, i get a full name of a person in our database. Some full names have middle names so therefore having 3 total words and some have first name and last name which gives me 2 words and in rare occassions some have 4 words.
Can anyone tell me how I can get the last word and the first letter in this variable? so that i can echo The initial for the first name and the last name. So for example the following full name: James Carpenter Robertson, needs to output: J. Robertson