View Single Post
  #9  
Old 12-16-2007, 02:24 AM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
Quote:
Originally Posted by Kyranki View Post
Then this is what you're looking for.
That just returns the value of the variable with the lowest value, not the name of the variable. I'd still have to check every variable to see if it matches that value.

EDIT: Came up with a way to do it:

PHP Code:
temp.lowest=999999;
temp.arrayvalue 0;
for (
i:temp.array) {
  if (
i<temp.lowest) {
    
temp.lowest i;
    
temp.lowestposition temp.arrayvalue;
  }
  
temp.arrayvalue++;

Gives the lowest value and its position in the array, which is pretty much just as good since each variable's array position is known.
__________________
Reply With Quote