Script assumes you have a $nameStr variable for the name, in the form, SHARFF,CAROLE J
<?php
list($firstPart,$secondPart)=explode(',', $nameStr);
//results in $firstPart="SHARFF", $secondPart="CAROLE J"
echo "Dear $secondPart"; //returns Dear CAROLE J
echo "$firstPart $secondPart"; //returns CAROLE J SHARFF
?>