Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有一种方法可以剖析一个人的全名,即从 mysql 数据库中提取名字、中间名和姓氏并将其存储到 php 变量中?谢谢..
使用explode函数来分隔firstname, middlename, andlastname并将其存储在变量中,这是演示。
explode
firstname
middlename
lastname
$name = "first middle last"; $arr = explode(" ",$name); $first = $arr[0]; $middle= $arr[1]; $last= $arr[2];