因为工作上需要编写专门进行拼音形式转换的类,比如海阳li=LI_Hai-Yang,同行也有这样的要求的话,请直接复制代码,给新人增加人气,谢谢。太疯狂了,代码:
?嗯?PHP
/* *
* @class作者字段处理类
* @奥托温家宝
*门户总数:根据输入的作者信息和返回格式处理信息的dealauthor ($ author _ info,$ back _ mode)方法
*步骤:
* 1 .将传入作者信息统一转换为一维数组,而不考虑传入的二维数组
* 2 .根据进来的作者排列的规律(姓氏是前面还是前面)判断姓氏的位置
* 3 .根据返回格式分为两个阶段。
* 3.1没有写这个参数。请输入返回格式:array/string ';
* 3.2返回格式定义为array。
* 3.2.1遍历作者数组,按个别作者顺序处理
* 3.2.2调用方法is_china_author()检查是否是中国作者,如果是,则返回作者姓名的数组,否则返回false
*根据步骤3.2.3之前返回的信息,如果您是中国作者,请调用deal_fullname()方法进一步处理特殊名称Xi'an等名称,如果您不是中国作者,请直接返回原始作者姓名
* 3.3返回格式定义为string。
* 3.3.1遍历作者数组,按个别作者顺序处理
* 3.3.2调用方法is_china_author()检查是否是中国作者,如果是,则返回作者姓名的数组,否则返回false
*根据步骤3.3.3之前返回的信息,如果您是中国作者,请调用deal_fullname()方法进一步处理特殊名称Xi'an等名称,如果您不是中国作者,请直接返回原始作者姓名
*
*代码的主要实现方法deal_fullname($fullname):
* 缩写:J.B. or JB or一个字
* 判断作者姓名是否有单引号,如果有,直接改为“-”
* 判断是否有“-”分割名称。如果有的话,保存作者本身的写法,装配名称为规范形式,返回作者信息数组。
*“-”如果没有分割,首先确定只有一个名字,如果有,直接输出,否则决定for循环
* for循环:依次拦截名字的前I位,并在拼音数组中与后半部分匹配,同时匹配时返回定义变量$have_res,确认名字是2个词,不匹配时表示不是中国作家,直接返回。
* for循环结束后,根据现有信息组装并返回作者结果数据。
*/
Class Deal_author
{
Static private $ this _=null
/* *
* @title将依次开始处理作者
* @ param array/string $ author _ info关于作者
* @param string $back_mode返回格式:array or string
* @return array/string英文名称照常以空格分隔输出,中文名称输出为WEN_Jia-Bao
* @奥托温家宝
*/
static public function deal author($ author _ info,$ back _ mode) {
If(!Self:$this_) {
$ this _=self :3360 $ this _=new self;
}else{
$ this _=self: $ this _
}
$ author _ arr=array();
If(!is _ array($ author _ info){
$author_info=str_replace(',',',',',',$ author _ info);
$ author _ arr=array _ filter(explode(',',$ author _ info));
}else{
$ author _ arr=$ author _ info
}
//判断城堡的位置
$ is _ surname _ first=$ this _-is _ surname _ first($ author _ arr);
//已处理的数组返回作者姓名电子仓库
$ after _ process _ author _ array=array();
//已处理的字符串返回作者姓名电子仓库
$ after _ process _ author _ string=' ';
If(!$back_mode){
请输入' Return '返回格式:array/string ';
}elseif($back_mode==')
;array'){foreach ($author_arr as $single_author_name) {
$single_author_name = trim($single_author_name);
$is_china_author = $this_->is_china_author($single_author_name,$is_surname_first);
switch ($is_china_author) {
case true:
$author = $this_->deal_fullname($is_china_author);
$after_process_author_array[] = $author;
break;
case false:
$after_process_author_array[] = $single_author_name;
break;
}
}
return $after_process_author_array;
}elseif($back_mode = 'string'){
foreach ($author_arr as $single_author_name) {
$single_author_name = trim($single_author_name);
$is_china_author = $this_->is_china_author($single_author_name,$is_surname_first);
switch ($is_china_author) {
case true:
$author = $this_->deal_fullname($is_china_author);
$after_process_author_string .= $author['name']['fullname'].',';
break;
case false:
$after_process_author_string .= $single_author_name.',';
break;
}
}
return substr($after_process_author_string,0,-1);
}
}
/**
* @title 判断是否是中国作者
* @param string $single_author_name 单个的作者名
* @param bool $is_surname_first 是否姓在前
* @return array $fullname = array('firstname'=>$firstname,'lastname'=>$lastname)
*/
private function is_china_author($single_author_name,$is_surname_first){
// 百家姓拼音
$surname = $this->pinyin()[2];
$single_author_name = explode(' ',trim(str_replace(' ',' ',strtolower($single_author_name))));
if(count($single_author_name) != 2){
return false;
}elseif(isset($surname[$single_author_name[0]]) || isset($surname[$single_author_name[1]])){
if($is_surname_first){
$fullname = array(
'firstname'=>strtoupper($single_author_name[0]),
'lastname'=>$single_author_name[1]
);
}else{
$fullname = array(
'firstname'=>strtoupper($single_author_name[1]),
'lastname'=>$single_author_name[0]
);
}
return $fullname;
}else{
return false;
}
}
/**
* $title 拼音封装
*/
private function pinyin(){
$pinyin = array(
'a'=>0,'ai'=>1,'an'=>2,'ang'=>3,'ao'=>4,'ba'=>5,'bai'=>6,'ban'=>7,'bang'=>8,'bao'=>9,'bei'=>10,'ben'=>11,'beng'=>12,'bi'=>13,'bian'=>14,'biao'=>15,'bie'=>16,'bin'=>17,'bing'=>18,'bo'=>19,'bu'=>20,'ca'=>21,'cai'=>22,'can'=>23,'cang'=>24,'cao'=>25,'ce'=>26,'cen'=>26,'ceng'=>27,'cha'=>28,'chai'=>29,'chan'=>30,'chang'=>31,'chao'=>32,'che'=>33,'chen'=>34,'cheng'=>35,'chi'=>36,'chong'=>37,'chou'=>38,'chu'=>39,'chuai'=>40,'chuan'=>41,'chuang'=>42,'chui'=>43,'chun'=>44,'chuo'=>45,'ci'=>46,'cong'=>47,'cou'=>48,'cu'=>49,'cuan'=>50,'cui'=>51,'cun'=>52,'cuo'=>53,'da'=>54,'dai'=>55,'dan'=>56,'dang'=>57,'dao'=>58,'de'=>59,'deng'=>60,'di'=>61,'dian'=>62,'diao'=>63,'die'=>64,'ding'=>65,'diu'=>66,'dong'=>67,'dou'=>68,'du'=>69,'duan'=>70,'dui'=>71,'dun'=>72,'duo'=>73,'e'=>74,'en'=>75,'er'=>76,'fa'=>77,'fan'=>78,'fang'=>79,'fei'=>80,'fen'=>81,'feng'=>82,'fo'=>83,'fou'=>84,'fu'=>85,'ga'=>86,'gai'=>87,'gan'=>88,'gang'=>89,'gao'=>90,'ge'=>91,'gei'=>92,'gen'=>93,'geng'=>94,'gong'=>95,'gou'=>96,'gu'=>97,'gua'=>98,'guai'=>99,'guan'=>100,'guang'=>101,'gui'=>102,'gun'=>103,'guo'=>104,'ha'=>105,'hai'=>106,'han'=>107,'hang'=>108,'hao'=>109,'he'=>110,'hei'=>111,'hen'=>112,'heng'=>113,'hong'=>114,'hou'=>115,'hu'=>116,'hua'=>117,'huai'=>118,'huan'=>119,'huang'=>120,'hui'=>121,'hun'=>122,'huo'=>123,'ji'=>124,'jia'=>125,'jian'=>126,'jiang'=>127,'jiao'=>128,'jie'=>129,'jin'=>130,'jing'=>131,'jiong'=>132,'jiu'=>133,'ju'=>134,'juan'=>135,'jue'=>136,'jun'=>137,'ka'=>138,'kai'=>139,'kan'=>140,'kang'=>141,'kao'=>142,'ke'=>143,'ken'=>144,'keng'=>145,'kong'=>146,'kou'=>147,'ku'=>148,'kua'=>149,'kuai'=>150,'kuan'=>151,'kuang'=>152,'kui'=>153,'kun'=>154,'kuo'=>155,'la'=>156,'lai'=>157,'lan'=>158,'lang'=>159,'lao'=>160,'le'=>161,'lei'=>162,'leng'=>163,'li'=>164,'lia'=>165,'lian'=>166,'liang'=>167,'liao'=>168,'lie'=>169,'lin'=>170,'ling'=>171,'liu'=>172,'long'=>173,'lou'=>174,'lu'=>175,'lv'=>176,'luan'=>177,'lue'=>178,'lun'=>179,'luo'=>180,'ma'=>181,'mai'=>182,'man'=>183,'mang'=>184,'mao'=>185,'me'=>186,'mei'=>187,'men'=>188,'meng'=>189,'mi'=>190,'mian'=>191,'miao'=>192,'mie'=>193,'min'=>194,'ming'=>195,'miu'=>196,'mo'=>197,'mou'=>198,'mu'=>199,'na'=>200,'nai'=>201,'nan'=>202,'nang'=>203,'nao'=>204,'ne'=>205,'nei'=>206,'nen'=>207,'neng'=>208,'ni'=>209,'nian'=>210,'niang'=>211,'niao'=>212,'nie'=>213,'nin'=>214,'ning'=>215,'niu'=>216,'nong'=>217,'nu'=>218,'nv'=>219,'nuan'=>220,'nue'=>221,'nuo'=>222,'o'=>223,'ou'=>224,'pa'=>225,'pai'=>226,'pan'=>227,'pang'=>228,'pao'=>229,'pei'=>230,'pen'=>231,'peng'=>232,'pi'=>233,'pian'=>234,'piao'=>235,'pie'=>236,'pin'=>237,'ping'=>238,'po'=>239,'pu'=>240,'qi'=>241,'qia'=>242,'qian'=>243,'qiang'=>244,'qiao'=>245,'qie'=>246,'qin'=>247,'qing'=>248,'qiong'=>249,'qiu'=>250,'qu'=>251,'quan'=>252,'que'=>253,'qun'=>254,'ran'=>255,'rang'=>256,'rao'=>257,'re'=>258,'ren'=>259,'reng'=>260,'ri'=>261,'rong'=>262,'rou'=>263,'ru'=>264,'ruan'=>265,'rui'=>266,'run'=>267,'ruo'=>268,'sa'=>269,'sai'=>270,'san'=>271,'sang'=>272,'sao'=>273,'se'=>274,'sen'=>275,'seng'=>276,'sha'=>277,'shai'=>278,'shan'=>279,'shang'=>280,'shao'=>281,'she'=>282,'shen'=>283,'sheng'=>284,'shi'=>285,'shou'=>286,'shu'=>287,'shua'=>288,'shuai'=>289,'shuan'=>290,'shuang'=>291,'shui'=>292,'shun'=>293,'shuo'=>294,'si'=>295,'song'=>296,'sou'=>297,'su'=>298,'suan'=>299,'sui'=>300,'sun'=>301,'suo'=>302,'ta'=>303,'tai'=>304,'tan'=>305,'tang'=>306,'tao'=>307,'te'=>308,'teng'=>309,'ti'=>310,'tian'=>311,'tiao'=>312,'tie'=>313,'ting'=>314,'tong'=>315,'tou'=>316,'tu'=>317,'tuan'=>318,'tui'=>319,'tun'=>320,'tuo'=>321,'wa'=>322,'wai'=>323,'wan'=>324,'wang'=>325,'wei'=>326,'wen'=>327,'weng'=>328,'wo'=>329,'wu'=>330,'xi'=>331,'xia'=>332,'xian'=>333,'xiang'=>334,'xiao'=>335,'xie'=>336,'xin'=>337,'xing'=>338,'xiong'=>339,'xiu'=>340,'xu'=>341,'xuan'=>342,'xue'=>343,'xun'=>344,'ya'=>345,'yan'=>346,'yang'=>347,'yao'=>348,'ye'=>349,'yi'=>350,'yin'=>351,'ying'=>352,'yo'=>353,'yong'=>354,'you'=>355,'yu'=>356,'yuan'=>357,'yue'=>358,'yun'=>359,'za'=>360,'zai'=>361,'zan'=>362,'zang'=>363,'zao'=>364,'ze'=>365,'zei'=>366,'zen'=>367,'zeng'=>368,'zha'=>369,'zhai'=>370,'zhan'=>371,'zhang'=>372,'zhao'=>373,'zhe'=>374,'zhen'=>375,'zheng'=>376,'zhi'=>377,'zhong'=>378,'zhou'=>379,'zhu'=>380,'zhua'=>381,'zhuai'=>382,'zhuan'=>383,'zhuang'=>384,'zhui'=>385,'zhun'=>386,'zhuo'=>387,'zi'=>388,'zong'=>389,'zou'=>390,'zu'=>391,'zuan'=>392,'zui'=>393,'zun'=>394,'zuo'=>395
);
$surname = array('ai'=>0,'aixinjueluo'=>1,'an'=>2,'ao'=>3,'ba'=>4,'bai'=>5,'baili'=>6,'ban'=>7,'bao'=>8,'bei'=>9,'ben'=>10,'bi'=>11,'bilu'=>12,'bian'=>13,'bie'=>14,'bing'=>15,'bo'=>16,'boerjijin'=>17,'boshang'=>18,'bu'=>19,'cai'=>20,'cang'=>21,'cao'=>22,'cen'=>23,'chai'=>24,'chanyu'=>25,'chang'=>26,'chao'=>27,'che'=>28,'chen'=>29,'cheng'=>30,'ci'=>301,'chi'=>31,'chong'=>32,'chou'=>321,'chu'=>33,'chuan'=>331,'chunyu'=>34,'cong'=>35,'cui'=>36,'dai'=>37,'dang'=>38,'dao'=>39,'deng'=>40,'di'=>41,'diwu'=>42,'diao'=>43,'ding'=>44,'dong'=>45,'dongfang'=>46,'dongguo'=>47,'dongmen'=>48,'dou'=>49,'du'=>50,'dugu'=>51,'duanmu'=>52,'duan'=>53,'duangan'=>54,'duo'=>55,'eerdeyu'=>56,'e'=>57,'fa'=>58,'fan'=>59,'fang'=>60,'fei'=>61,'feng'=>62,'fu'=>63,'fucha'=>64,'gai'=>65,'gan'=>66,'gang'=>67,'gao'=>68,'ge'=>69,'geng'=>70,'gong'=>71,'gongliang'=>72,'gongsun'=>73,'gongxi'=>74,'gongyang'=>75,'gongye'=>76,'gou'=>77,'goukang'=>78,'gu'=>79,'guliang'=>80,'guan'=>81,'guang'=>82,'gui'=>83,'guihai'=>84,'guo'=>85,'hai'=>86,'han'=>87,'hang'=>88,'hao'=>89,'he'=>90,'helian'=>91,'hesheli'=>92,'heng'=>93,'hong'=>94,'hou'=>95,'huyan'=>96,'hu'=>97,'hua'=>98,'huai'=>99,'huan'=>100,'huang'=>101,'huangfu'=>102,'hui'=>103,'hun'=>104,'huo'=>105,'ji'=>106,'jia'=>107,'jiagu'=>108,'jian'=>109,'jiang'=>110,'jiao'=>111,'jie'=>112,'jin'=>113,'jinchu'=>114,'jing'=>115,'jiu'=>116,'ju'=>117,'jun'=>1171,'juan'=>1172,'jueercha'=>118,'ka'=>119,'kan'=>120,'kang'=>121,'ke'=>122,'kong'=>123,'kou'=>124,'kuyala'=>125,'kuai'=>126,'kuang'=>127,'kuanghou'=>128,'kui'=>129,'lai'=>130,'lan'=>131,'lang'=>132,'lao'=>133,'lei'=>134,'le'=>1351,'leng'=>135,'li'=>136,'lian'=>137,'liang'=>138,'liangqiu'=>139,'liao'=>140,'lin'=>141,'ling'=>142,'linghu'=>143,'liu'=>144,'long'=>145,'lou'=>146,'lyu'=>1471,'lu'=>147,'luan'=>148,'luo'=>149,'lvqiu'=>150,'lv'=>151,'ma'=>152,'mai'=>153,'man'=>154,'mao'=>155,'mei'=>156,'men'=>157,'meng'=>158,'mi'=>159,'miao'=>160,'min'=>161,'ming'=>162,'miu'=>163,'mo'=>164,'moha'=>165,'moqi'=>166,'mu'=>167,'murong'=>168,'na'=>169,'nala'=>170,'nan'=>171,'nangong'=>172,'nanmen'=>173,'neyinfucha'=>174,'neng'=>175,'ni'=>176,'nianai'=>177,'nie'=>178,'ning'=>179,'niu'=>180,'niuhulu'=>181,'nong'=>182,'ou'=>183,'ouyang'=>184,'pan'=>185,'pang'=>186,'pei'=>187,'peng'=>188,'pi'=>189,'piao'=>190,'ping'=>191,'pu'=>192,'puyang'=>193,'qi'=>194,'qidiao'=>195,'qiguan'=>196,'qian'=>197,'qiang'=>198,'qiao'=>199,'qiaoda'=>200,'qin'=>201,'qing'=>202,'qiong'=>203,'qiu'=>204,'qu'=>205,'quan'=>206,'que'=>207,'ran'=>208,'rangsi'=>209,'rang'=>210,'rao'=>211,'ren'=>212,'rong'=>213,'ru'=>214,'ruyan'=>215,'ruan'=>216,'rui'=>217,'sahala'=>218,'sakeda'=>219,'samala'=>220,'sa'=>221,'sai'=>222,'sang'=>223,'sha'=>224,'shan'=>225,'shang'=>226,'shangmou'=>227,'shangguan'=>228,'shao'=>229,'she'=>230,'sheer'=>231,'shen'=>232,'shentu'=>233,'sheng'=>234,'shi'=>235,'shijiamouni'=>2351,'shijiamuni'=>2352,'shou'=>236,'shu'=>237,'shushu'=>238,'shuai'=>239,'shuang'=>240,'shui'=>241,'si'=>242,'sikong'=>243,'sikou'=>244,'sima'=>245,'situ'=>246,'song'=>247,'su'=>248,'sui'=>249,'sun'=>250,'suo'=>251,'tatala'=>252,'tai'=>253,'taishu'=>254,'tan'=>255,'tantai'=>256,'tang'=>257,'tao'=>258,'teng'=>259,'tian'=>260,'tong'=>261,'tou'=>262,'tu'=>263,'tuo'=>2631,'tumen'=>264,'tuqin'=>265,'tuoba'=>266,'wan'=>267,'wang'=>268,'wei'=>269,'weisheng'=>270,'wen'=>271,'wenren'=>272,'weng'=>273,'wo'=>274,'wu'=>275,'wuma'=>276,'wuya'=>277,'xi'=>278,'xiu'=>2781,'ximen'=>279,'xitala'=>280,'xia'=>281,'xiahou'=>282,'xian'=>283,'xianyu'=>284,'xiangli'=>285,'xiang'=>286,'xiao'=>287,'xie'=>288,'xin'=>289,'xing'=>290,'xiong'=>291,'xu'=>292,'xuan'=>293,'xuanyuan'=>294,'xue'=>295,'xun'=>296,'yan'=>297,'yanfa'=>298,'yanfu'=>299,'yang'=>300,'yangshe'=>301,'yangtong'=>302,'yao'=>303,'ye'=>304,'yehenala'=>305,'yehenalan'=>306,'yi'=>307,'yierjuewuluo'=>308,'yiyugenjueluo'=>309,'yin'=>310,'ying'=>311,'yong'=>312,'you'=>313,'youqin'=>314,'yu'=>315,'yuwen'=>316,'yuchi'=>317,'yuan'=>318,'yue'=>319,'yueshuai'=>320,'yuezheng'=>321,'yun'=>322,'zai'=>323,'zaifu'=>324,'zan'=>325,'zang'=>326,'ze'=>327,'zeng'=>328,'zha'=>329,'zhai'=>330,'zhan'=>331,'zhang'=>332,'zhangjia'=>333,'zhangdu'=>334,'zhangsun'=>335,'zhao'=>336,'zhen'=>337,'zheng'=>338,'zhi'=>339,'zhong'=>340,'zhongli'=>341,'zhongchang'=>342,'zhongsun'=>343,'zhou'=>344,'zhu'=>345,'zhuge'=>346,'zhuayujia'=>347,'zhuansun'=>348,'zhuang'=>349,'zhuo'=>350,'zi'=>351,'ziche'=>352,'zong'=>353,'zongzheng'=>354,'zou'=>355,'zu'=>356,'zuo'=>357,'zuoqiu'=>358);
$total = array('1'=>$pinyin,'2'=>$surname);
return $total;
}
/**
* @title 处理作者姓名
* @param array $fullname 姓与名的数组:array('firstname'=>$firstname,'lastname'=>$lastname)
* @return array('name'=>array('fullname'=>姓_名-名/姓_名,'shortname'=>'J.B.'))
*/
private function deal_fullname($fullname){
$pinyin = $this->pinyin()[1];
$first_name = $fullname['firstname'];
$lastname = $fullname['lastname'];
$last_name = '';
$short_name = '';
// 名本身为简写时去除“.”
if(strpos($lastname,".")){
$lastname = str_replace(".", '', $lastname);
}
// 名只有一个字母时
if(strlen($lastname) == 1){
$last_name = ucwords($lastname);
$short_name = ucwords($lastname).'.';
return array(
'name'=>array(
'fullname' => $first_name.'_'.$last_name,
'shortname'=> $short_name
)
);
// 名只有两个字母且不可组成拼音时
}elseif(strlen($lastname) == 2 && !isset($pinyin[$lastname])){
$lastname = strtoupper($lastname);
$last_name = $lastname[0].'-'.$lastname[1];
$short_name = $lastname[0].'.'.$lastname[1].'.';
return array(
'name'=>array(
'fullname' => $first_name.'_'.ucwords($last_name),
'shortname'=> $short_name
)
);
}
// 针对xi'an情况做判断
if(strpos($lastname,"'")){
$lastname = str_replace("'", '-', $lastname);
}
// 判断是否有“-”分割名,无则返回false
$have_cut = strpos($lastname,'-');
// 有“-”分割名时,组装名为规范格式,返回数组
if($have_cut !== false){
$last_name = ucwords(substr($lastname,0,$have_cut+1)).ucwords(substr($lastname,$have_cut+1));
$short_name = substr($last_name,0,1).'.'.substr($last_name,$have_cut+1,1).'.';
return array(
'name'=>array(
'fullname' => $first_name.'_'.$last_name,
'shortname'=> $short_name
)
);
}else{
// 无“-”分割名时,组装名为规范格式,返回数组
// 如果名可作为一个整体且可在拼音数组匹配,则直接输出,否则进行for循环确定
if(isset($pinyin[$lastname])){
$last_name = ucwords($lastname);
$short_name = substr($last_name,0,1).'.';
return array(
'name'=>array(
'fullname' => $first_name.'_'.$last_name,
'shortname'=> $short_name
)
);
}else{
// 依次截取名的前i位,与后半部分在拼音数组中进行匹配,同时匹配时返回
for ($i=1; $i < strlen($lastname)+1; $i++) {
$first_section = substr($lastname,0,$i);
$second_section = substr($lastname,$i);
// 如果前半部分和后半部分都可与拼音数组匹配,则确定名为2个字
if(isset($pinyin[$first_section]) && isset($pinyin[$second_section])){
$last_name = ucwords(substr($lastname,0,$i)).'-'.ucwords(substr($lastname,$i));
$short_name = substr($last_name,0,1).'.'.substr($last_name,$i+1,1).'.';
$have_res = 1;
break;
}
}
if(isset($have_res)){
return array(
'name'=>array(
'fullname' => $first_name.'_'.$last_name,
'shortname'=> $short_name
)
);
}else{
return array(
'name'=>array(
'fullname' => $first_name.' '.$lastname,
'shortname'=> $first_name.' '.$lastname
)
);
}
}
}
}
/**
* @title 根据一串作者判断:姓在前 or 姓在后
* @param array $author_arr 一条数据的所有作者
* @return bool true 姓在前 false 姓在后
*/
public function is_surname_first($author_arr){
// 百家姓拼音
$surname = $this->pinyin()[2];
$xing_is_first_count = 0;
$ming_is_first_count = 0;
foreach ($author_arr as $key) {
$single_author_name = explode(' ',preg_replace('/\s+/',' ',trim(strtolower($key))));
if(count($single_author_name) == 2){
// 第一个为姓,姓在前+1
if (isset($surname[$single_author_name[0]]) && !isset($surname[$single_author_name[1]]))
{
$xing_is_first_count++;
// 第二个为姓,名在前+1
}elseif(!isset($surname[$single_author_name[0]]) && isset($surname[$single_author_name[1]]))
{
$ming_is_first_count++;
}
}
}
if($xing_is_first_count >= $ming_is_first_count){
return true;
}else{
return false;
}
}
}
$arr = array(
// '3'=>array('Andrey Yu Zubarev' , 'Larisa Yu Iskakova'),
// '0'=>array('He Bai-Ying' , 'Zhao Gao' , 'Zhang Ke',' Zhao Cheng-Xue'),
// '1'=>array('M.V. Nikonov' , 'D.L. Chizhov ','K.I. Pashkevich','Hengdao Quan'),
// '2'=>array('Junji Murata' , 'Renxiao Gao',' Masanori Tamura ','Akira Sekiya'),
// '1'=>array('Li Y.G.','QIN L.G.' , 'WANG D.F.','LI dg','PENG yg'),
'2'=>array('Xiu Dianrong')
);
foreach ($arr as $key) {
// Deal_author::dealauthor($key,'array');
// echo @Deal_author::dealauthor($key)."\n";
// print_r(Deal_author::dealauthor($key,'array'))."\n";
echo Deal_author::dealauthor($key,'string')."\n";
}
1.《【nisang】将拼音转换为自定义格式(例如,海阳li=LI_Hai-Yang)》援引自互联网,旨在传递更多网络信息知识,仅代表作者本人观点,与本网站无关,侵删请联系页脚下方联系方式。
2.《【nisang】将拼音转换为自定义格式(例如,海阳li=LI_Hai-Yang)》仅供读者参考,本网站未对该内容进行证实,对其原创性、真实性、完整性、及时性不作任何保证。
3.文章转载时请保留本站内容来源地址,https://www.lu-xu.com/auto/3038361.html