I have a string such as:
Crosby Bing, Gretzky Wayne, Clemente Roberto
I would like to have the string converted to an array so it looks like:
LName[0]=>Crosby
FName[0]=>Bing,
LName[1]=>Gretzky
FName[1]=>Wayne,
LName[2]=>Clemente
FName[2]=>Roberto
I am terrible with arrays and string manipulation and have done many searches on the web but can’t locate the appropriate solution.
I look forward to your response!
Try this out:
demo: http://codepad.org/g4YnwKxW
Or if your list is dynamic:
demo: http://codepad.org/WMIx9mJD