PHP code example of alkoumi / laravel-arabic-numbers
1. Go to this page and download the library: Download alkoumi/laravel-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/ */
alkoumi / laravel-arabic-numbers example snippets
use Alkoumi\LaravelArabicNumbers\Numbers;
$number = 64.56;
Numbers::TafqeetMoney($number); //It will Give SAR by default
// RESULT { أربعة و ستون ريالًا و ست و خمسون هللة فقط لا غير }
[OR]
$value = 64.56;
Numbers::TafqeetMoney($value,'EGP'); //You can pass $currency as the second @param
// RESULT { أربعة و ستون جنيهًا و ست و خمسون قرش فقط لا غير }
use Alkoumi\LaravelArabicNumbers\Numbers;
$number = 64;
Numbers::TafqeetNumber($number);
// RESULT { أربعة و ستون }
use Alkoumi\LaravelArabicNumbers\Numbers;
$string = "أربع و ستون فاصلة ست و خمسون";
Numbers::NumberFromString($number);
// RESULT 64.56
use Alkoumi\LaravelArabicNumbers\Numbers;
$number = 64; // integar value
Numbers::ShowInArabicDigits($number);
// RESULT "٦٤.٥٦"
[OR]
use Alkoumi\LaravelArabicNumbers\Numbers;
$value = "٦٤.٥٦"; // Can be Any Value STRING or INTEGAR
Numbers::ShowInEnglishDigits($value);
// RESULT "64.56"
[EVEN 🥳 Any Value]
use Alkoumi\LaravelArabicNumbers\Numbers;
$value = "تاريخ اليوم : 22-10-2020"; // Can be Any Mix Value STRING with INTEGAR
Numbers::ShowInArabicDigits($value);
// RESULT {تاريخ اليوم : ٢٢-١٠-٢٠٢٠}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.