PHP/Math/max

Материал из Web эксперт
Версия от 10:06, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

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>