function uclo($input) {
$pos = strpos($input, "-");
if($pos === false) { return ucfirst(strtolower($input)); }
else { $inputArr =explode("-", $input);
return ucfirst(strtolower($inputArr[0]))."-".ucfirst(strtolower($inputArr[1]));}
}
$firstName = "lAnce"; $lastName = "lincoln-Miller"; "Hello ".uclo($firstName)." ".uclo($lastName).".";
Hello Lance Lincoln-Miller.