且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PHP:单词中的快速数字

更新时间:2023-02-26 13:09:52

使用 NumberFormatter类在php中;)

$f = new NumberFormatter("en", NumberFormatter::SPELLOUT);
echo $f->format(1432);

那将输出"1434.2"

That would output "one thousand four hundred thirty-two"