PHP code example of meezaan / arabic-numbers
1. Go to this page and download the library: Download meezaan/arabic-numbers library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
meezaan / arabic-numbers example snippets
use ArabicNumbers\Numbers;
// Latin to Arabic
$arabic = Numbers::latinToArabic(157); // returns ١٥٧
// Arabic to latin
$latin - Numbers::arabicToLatin(١٥٧); // returns 157
// Arabic to HTML
$html = Numbers::ArabicToHtml(١٥٧); // returns ١٥٧
php vendor/bin/phpunit --bootstrap vendor/autoload.php tests/