RE: Array difficulty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux