PHP/Math/max

Материал из Web эксперт
Перейти к: навигация, поиск

Finding the Greatest and Least Values in a key-value pair

   <source lang="html4strict">

<?php

 $clothes = array( "hats" => 75, "coats" => 32, "shoes" => 102,);
 uasort($clothes, "evenfirst");
 var_export($clothes);
 
printf("

Most items: %d; least items: %d.

\n",
         max($clothes), min($clothes));

?>

 </source>