$arrSam1[0] = array("a", array("2"));
 $arrSam1[1] = array("b", array("1","2", "3", "4"));
 $arrSam1[2] = array("c", array("1","2", "3"));
 
 $arrSam = usort($arrSam1, 'cmp');

 function cmp($a, $b)
 {
   return count($a[1]) > count($b[1]) ? -1 : 1;
 }
Posted in PHP.

Leave a reply