How to sort an array with a function manually in alphabetical order?
Without using automatic sort such as (sort, asort, usort, ...)
I've tried the code below so far but I feel like there is another way to do it
<?php
function sort_arrays(array $var) {
for ($i=0; $i < 4; $i++) {
print_r($var);
}
else {
return null;
}
}
sort_arrays($array = array("A_first","D_last","B_second","C_third"));