# Number to Letters

**URL:** <https://discourse.cakephp.org/t/number-to-letters/8639>\
**Category:** Uncategorized\
**Created:** [November 20, 2020, 8:51pm UTC](https://discourse.cakephp.org/t/number-to-letters/8639 "2020-11-20T20:51:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wtamayom](https://avatars.discourse-cdn.com/v4/letter/w/b2d939/32.png) [@wtamayom](https://discourse.cakephp.org/u/wtamayom)\
**Post date:** [November 20, 2020, 8:51pm UTC](https://discourse.cakephp.org/t/number-to-letters/8639/1 "2020-11-20T20:51:54Z")

</div>

Hi.  
Is possible to get in a controller the number in letters of an int  
(1.250.000) (mil, doscientos cincuenta pesos)  
Thanks.

---

<div class="post-metadata">

**Author:** ![FinlayDaG33k](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/finlaydag33k/32/1049_2.png) [@FinlayDaG33k](https://discourse.cakephp.org/u/FinlayDaG33k)\
**Post date:** [November 20, 2020, 9:16pm UTC](https://discourse.cakephp.org/t/number-to-letters/8639/2 "2020-11-20T21:16:57Z")

</div>

Use the a built-in PHP function for that `\strlen($int);`

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [November 20, 2020, 9:35pm UTC](https://discourse.cakephp.org/t/number-to-letters/8639/3 "2020-11-20T21:35:43Z")

</div>

I think you’re looking not for the length of a string, but to convert a number into the “words” representation (e.g. from “1” to “one”)? For that, see [https://stackoverflow.com/questions/11500088/php-express-number-in-words](https://stackoverflow.com/questions/11500088/php-express-number-in-words)
