简体   繁体   English

如何将数字转换为字符串

[英]how to convert number into string

I was wondering if its possible to convert a number into a string using php? 我想知道是否有可能使用php将数字转换成字符串? Let's say I want to convert "25,435" into twenty five thousand four hundred thirty five. 假设我想将"25,435"转换为"25,435" twenty five thousand four hundred thirty five.

Any idea how? 任何想法如何?

There's nothing in PHP by default to do this, but you can quite easily find something by Googling for "PHP number to word". 默认情况下,PHP中没有任何东西可以做到这一点,但是您可以通过谷歌搜索“ PHP数字转换为单词”来轻松找到一些东西。

http://www.krishnasrikanth.com/portfolio/works.php?app=numbwordter http://www.krishnasrikanth.com/portfolio/works.php?app=numbwordter

http://www.phpro.org/examples/Convert-Numbers-to-Words.html http://www.phpro.org/examples/Convert-Numbers-to-Words.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM