xxxxxxxxxx
// 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);
xxxxxxxxxx
$array = ['a', 'aa', 'bbb', 'c', 'dddd', 'ff'];
$lengths = array_map('strlen', $data);
echo "The shortest is " . min($lengths) .
". The longest is " . max($lengths);