advanced code snippet search
jatkins on 02/15/11
sort array String text Value length strlen
02/15/11 01:29am
Released into the public domain.
function find_longer_value($first, $second) { return strlen($first) > strlen($second);} function longest_value($array) { usort($array, 'find_longer_value'); return $array[count($array)-1];}
Report this snippet Tweet
Comment:
You need to login to post a comment.