hctilg / number-to-text

converts numbers to persian text.

Home Page:https://packagist.org/packages/hctilg/number-to-persian-text

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

number-to-text

converts numbers to persian text.

Usage

Library

Simply use:

// checking the exists Library.
if (!file_exists("number-to-text.php")) {
  copy('https://raw.githubusercontent.com/hctilg/number-to-text/main/number-to-text.php', 'number-to-text.php');
}

// require Library.
require_once('number-to-text.php');

$input = '<Your Number>';

$output = number_to_text($input);

echo "Text: $output";

API

Send requests to /number-to-text.php.

Method Parameter
GET/POST string number

Preview

CLI

run php script:

php number-to-text.php

Preview


Test

Web

Go to the ./number-to-text folder and run php localhost:

php -S localhost:6040

then open the following url

http://localhost:6040/test.php

Preview

CLI

run php script:

php test.php

Preview

About

converts numbers to persian text.

https://packagist.org/packages/hctilg/number-to-persian-text

License:MIT License


Languages

Language:PHP 100.0%