I\'ve written what I thought was a very simple use of the php explode() function to split a name into forename and surname:
// split name into f
BTW, that algorithm won't work all the time. Think about two-word Latina or Italian surnames names like "De Castro", "Dela Cruz", "La Rosa", etc. Split will return 3 instead of 2 words:
Array {
[0] => 'Pedro'
[1] => 'De'
[1] => 'Castro'
}
You'll end up with messages like "Welcome back Ana De" or "Editing Profile of Monsour La".
Same thing will happen for two-word names like "Anne Marie Miller", "William Howard Taft", etc.
Just a tip.