PHP is a server scripting language, and It is a powerful tool for making interactive and dynamic Web-pages. I have used WampServer 2.2 for following excercise..
<?php
$my_array = array("bmw","jeep","dastun","ferrari","Honda");
$new_array = array_map('strlen', $my_array);
echo "The shortest array length is ". min($new_array)."<br>". // min() function
" The longest array length is " . max($new_array).'.'; //max() function
?>
Result:
The shortest array length is 3 The longest array length is 7.
PHP is a server scripting language, and It is a powerful tool for making interactive and dynamic Web-pages. I have used WampServer 2.2 for following excercise..
Result:
The shortest array length is 3
need an explanation for this answer? contact us directly to get an explanation for this answerThe longest array length is 7.