sorting numbers in php without using built in methods code example
Example: php sort array by value length
function sortByLength($a,$b){
return strlen($b)-strlen($a);
}
usort($array,'sortByLength');
function sortByLength($a,$b){
return strlen($b)-strlen($a);
}
usort($array,'sortByLength');