PHP code example of jijihohococo / myanmar-alphabet-sorting

1. Go to this page and download the library: Download jijihohococo/myanmar-alphabet-sorting 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/ */

    

jijihohococo / myanmar-alphabet-sorting example snippets


"repositories": [
        {
            "name": "jijihohococo/myanmar-alphabet-sorting",
            "type": "vcs",
            "url": "[email protected]:jijihohococo/myanmar-alphabet-sorting.git"
        }
    ],

composer 

use JiJiHoHoCoCo\MyanmarAlphabetSorting\Sorting;
$array=[ "က",
"ကား",
"ကိ",
"ကီ",
"ကေ",
"ကု",
"ကူ",
"ကူး",
"ကာ"];
Sorting::ascendingOrder($array);

Sorting::descendingOrder($array);

$multiDimensionalArray=[
['name'=>'ကေကေ',"age"=>'12'],
['name'=>'ကီကီ','age'=>'14'],
['name'=>'ကူးကူး','age'=>'13']
];

Sorting::ascendingMulti($multiDimensionalArray,'name');
Sorting::descendingMulti($multiDimensionalArray,'name');

$duplicatedMultiDimensionalArray=[
['name'=>'ကေကေ',"age"=>'12'],
['name'=>'ကီကီ','age'=>'14'],
['name'=>'ကူးကူး','age'=>'13'],
['name'=>'ကီကီ','age'=>'20']
];

Sorting::ascendingMulti($duplicatedMultiDimensionalArray,'name');
Sorting::descendingMulti($duplicatedMultiDimensionalArray,'name');