php - Most efficient way to get last initial? -
i'm working on custom forum. use email , password log in, , forum display first name , last initial. database stores first name , full last name.
what easiest way make abbreviate last name initial?
it uses display full name:
$name = $row['user_firstname'] . " " . $row['user_lastname']; thanks!
$name = $row['user_firstname'] . " " . $row['user_lastname'][0]; just add [0] end first character.
Comments
Post a Comment