amirsanni/number-to-words

There is no license information available for the latest version (dev-master) of this package.

A simple library for converting figures to words in PHP.

Maintainers

Package info

github.com/amirsanni/number-to-words

pkg:composer/amirsanni/number-to-words

Statistics

Installs: 12 152

Dependents: 0

Suggesters: 0

Stars: 5

Open Issues: 0

dev-master 2019-04-11 12:56 UTC

This package is auto-updated.

Last update: 2026-03-12 04:11:45 UTC


README

A PHP library for converting numbers (figures) to words in specified currency code.

Installation

composer require amirsanni/number-to-words

Supported Currency Codes

AED, AFN, ANG, ARS, AUD, BRL, CAD, CHF, CNY, DKK, DZD, EGP, EUR, GBP, GHC, GHS, HKD, ILS, INR, IQD, IRR, JMD, JOD, JPY, KES, KPW, KRW, KWD, LYD, MXN, MAD, MUR, NGN, NZD, PEN, PHP, PYG, QAR, RON, RSD, RUB, RWF, SAR, SDG, SEK, SGD, SHP, SYP, THB, TND, TRY, TWD, UGX, USD, VES, XAF, XCD, XOF, XPF, YER, ZAR.

Test

$obj = new NumberToWords();

echo $obj->convert(3490948028.56, "NGN");

Displays Three Billion, Four Hundred and Ninety Million, Nine Hundred and Forty-Eight Thousand, and Twenty-Eight Naira, Fifty-Six Kobo.