RsD0p9BK
5/5/2015 - 6:17 AM

array__sort_by_len.php

// Sort an array by the length of its values?

usort($array, function($a, $b) {
    return strlen($b) - strlen($a);
});

// http://stackoverflow.com/questions/838227/php-sort-an-array-by-the-length-of-its-values