I'm having a hellofa time working with strings in php, and I'm sure it's not half as difficult as it seems right now. Right now I'm trying to do something fairly simple:
last_name_first("Patrick Henry Reardon"); // returns "Reardon, Patrick Henry"
first_name_first("Reardon, Patrick Henry"); // returns "Patrick Henry Reardon"
It needs to work with big names (up to five words long) with first initials like "J." as well.
This seems terribly trivial to me, and some simple c++ string handling would do the trick:
$firstname = "Patrick";
$lastname = "Henry Reardon";
$fullname = $firstname + " " + $lastname;
echo $fullname;
Unfortunately php dosn't seem to work like this. Any pointers?