Created
April 29, 2020 21:37
-
-
Save ethicka/ffc3dbabc5a0f2cf68a14257ea73ed43 to your computer and use it in GitHub Desktop.
Build a name from a prefix and suffix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Build a name | |
*/ | |
function build_name($prefix, $fname, $lname, $suffix) { | |
$name = $fname . ' ' . $lname; | |
if($prefix) $name = $prefix . ' ' . $name; | |
if($suffix) $name = $name .= $suffix; | |
return $name; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment