RE: [PHP] Array difficulty

From: Date: Tue, 31 Jul 2007 13:43:00 +0000
Subject: RE: [PHP] Array difficulty
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-259901@lists.php.net to get a copy of this message
> At this point, $result would be equal to "uppercase". I feel > like this is a really kludgey way to accomplish this. Is there > a better way? Couldn't you just do arsort($chance); $lastItem = chance[( count( $chance ) - 1 )]; ? Why iterate through the array when all you need is the last value? thnx, Chris

« previous php.general (#259901) next »