📜  php 数组最长字符串 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:53.603000             🧑  作者: Mango

代码示例1
// Convert array to an array of string lengths
$lengths = array_map('strlen', $data);

  // Show min and max string length
echo "The shortest is " . min($lengths) .
     ". The longest is " . max($lengths);