note 27127 modified in function.array-map by vrana
| From: | vrana@php.net | Date: | Tue, 17 Aug 2004 13:58:38 +0000 |
| Subject: | note 27127 modified in function.array-map by vrana | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-79676@lists.php.net to get a copy of this message | ||
Get the max length in an array of strings
<?php
function maxLength($str) {
return strlen($str);
}
$maxLen = max(array_map("maxLength", $myArray));
?>
--was--
Get the max length in an array of strings
function maxLength($str) {
return strlen($str);
}
$maxLen = max(array_map("maxLength", $myArray));
http://php.net/manual/en/function.array-map.php