nineteenfeet/nf-number-to-word

Convert a number into its word representation. e.g. 1 => one

2.0.0 2023-06-16 12:56 UTC

This package is auto-updated.

Last update: 2024-10-16 16:23:30 UTC


README

This component provides a means to convert numeric number (e.g. 1023) to a string of works (e.g. one thousand and twenty three). It also provides a laminas-view helper called numberToWord.

Installation with Composer

$ composer require "nineteenfeet/nf-number-to-word"

Usage

use NFNumberToWord\NumberToWords;

$number = 1999;

$numberToWords = new NumberToWords();
$string = $numberToWords->toWords($number);