Users submit names in two separate fields: firstname(author_fname) and last name (author_lname) Entries are sometimes Smith, John J. or John and Mary Smith, or john j. smith. I need to get all extraneous characters out of the submission, so the name comes up with just the words: smithjohnj or johnandmarysmith. Using trim, I was able to delete the white space.
But I would like to get the comma out as well. Ex:
$text = $results["author_lname"].$results["author_fname"];
$trimmed = trim($text);
var_dump($trimmed);
$Aname = $trimmed;