在PHP中将国家字符转换为拉丁字符 [英] Convert national chars into their latin equivalents in PHP
本文介绍了在PHP中将国家字符转换为拉丁字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要一些包含将德国字符转换为拉丁字符的字符串.例如
I need some strings that contain german chars converted to their latin equivalent. For example
'Höhle' => 'Hohle'
推荐答案
使用Normalizer PHP扩展.
Use Normalizer PHP extension.
http://www.php.net/manual/zh/class. normalizer.php
<?php
$string = 'Höhle';
echo Normalizer::normalize($string);
?>
这篇关于在PHP中将国家字符转换为拉丁字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文