note 87680 deleted from function.max by thiago

From: Date: Tue, 16 Dec 2008 19:10:23 +0000
Subject: note 87680 deleted from function.max by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-148224@lists.php.net to get a copy of this message
Note Submitter: snob ---- <?php function min_alt($arr) { $min_alt = $arr[0]; for ($count = 1; $count < count($arr); $count++) { $min_alt = ($arr[$count] < $min_alt) ? $arr[$count] : $min_alt; } return $min_alt; } $array = array('dirty bastard', '3cats', 'five', 1.6, 2.598, 'take5', 8); echo "min_alt: ". min_alt($array); // we get 'take5' ?>

« previous php.notes (#148224) next »