PHP code example of mahdimajidzadeh / persianalize
1. Go to this page and download the library: Download mahdimajidzadeh/persianalize 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/ */
mahdimajidzadeh / persianalize example snippets
php
MahdiMajidzadeh\Persianalize\PersianalizeServiceProvider:class
php
$result = Persian::numbers_fa('123٤٥٦'); // return ۱۲۳۴۵۶
$result = Persian::numbers_en('۱۲۳٤٥٦'); // return 123456
$result = Persian::text('ي ڲ ڬ'); // return ی گ ک
$result = Persian::persian($text); // make texts and numbers Persian
$result = Persian::standard($text); // make texts Persian and numbers English