RE: [PHP] Re: Determine variable with the lowest value?

2004-10-18 Thread Paul Fine
Than you very much Matt. Does what I needed. Now I will have to read up on as and the function key. -Original Message- From: Matt M. [mailto:[EMAIL PROTECTED] Sent: October 14, 2004 11:27 AM To: BOOT Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Re: Determine variable with the lowest value

[PHP] Re: Determine variable with the lowest value?

2004-10-14 Thread Eric McGrane
Why use the min function? Just sort the array and then grab the first element in the sorted array. No random picking required. E Paul [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thanks guys. Yes I figured using an array and the MIN function would be a start. Now the random

[PHP] Re: Determine variable with the lowest value?

2004-10-14 Thread BOOT
OK thanks but I guess I didn't explain what I am trying to do properly. I need to be able to identify the variable name as well as pick the variable with the lowest value. Something like this: Whose turn is it to take out the garbage? Mike has done it 3 times Bob has done it 2 times Jane has

Re: [PHP] Re: Determine variable with the lowest value?

2004-10-14 Thread Matt M.
On Thu, 14 Oct 2004 10:52:20 -0500, BOOT [EMAIL PROTECTED] wrote: OK thanks but I guess I didn't explain what I am trying to do properly. I need to be able to identify the variable name as well as pick the variable with the lowest value. Something like this: Whose turn is it to take out

Re: [PHP] Re: Determine variable with the lowest value?

2004-10-14 Thread ApexEleven
/* Untested Code */ $arr[0]['id'] = 3; $arr[0]['name] = 'Mike'; $arr[1]['id'] = 2; $arr[1]['name'] = 'Bob'; $arr[2]['id'] = 5; $arr[2]['name'] = 'Jane'; array_multisort($arr['id'],$arr['name']); print It's .$arr[0]['name'].'s Turn To Take Out The Garbage!; /* End Untested Code */ On Thu, 14

Re: [PHP] Re: Determine variable with the lowest value?

2004-10-14 Thread Greg Donald
On Thu, 14 Oct 2004 10:52:20 -0500, BOOT [EMAIL PROTECTED] wrote: OK thanks but I guess I didn't explain what I am trying to do properly. I need to be able to identify the variable name as well as pick the variable with the lowest value. Something like this: Whose turn is it to take out