Optional full spelling, first spelling, first letter, first letter capitalization, all capitalization, custom dictionary
Unzip the extend directory
Controller code
$py = new pinyinHzpy();
echo $py->zhuan('Robert Schenkan',false,false,false,'_',['罗'=>'ba','特'=>'ba']);
@param string $beizhuanhanzi The converted string.
@param boolean $zhiqushouzimu only takes the first letter of each group of pinyin.
@param boolean $shouzimudaxie Capitalize the first letter of each pinyin group.
@param boolean $quanbudaxie Convert all to uppercase.
@param string $tihuan Replacement character for non-Chinese characters 0-9a-zA-Z.
@param array $fujiazidian adds a custom dictionary, overwriting the built-in dictionary. Format: ['luo'=>'gou','bu'=>'mao']
pinyin.zip ( 101.66 KB Download: 5 times )