seeking help building a function

From: tlhingan1 (Spamtlhingan1SPAM_at_SPAMoptonlineSPAM.SPAMnetMaps)
Date: 10/09/04


Date: Sat, 09 Oct 2004 03:32:18 GMT

hey folks, thanks for checking in.

Im new to PHP, Im looking for help on building a relatively simple
function while not re-inventing the wheel. I've heard PHP probably has
whatever function i can think of built-in, it's just a matter of piecing
it together the right way.

Simplest statement of the problem:
I want to build a function which accepts an array and returns the index
of the maximum valued element if it is distinct, otherwise it returns
something simple like 'N' (i.e. if there are two or more max elements,
returns 'N'; only one, returns its index)

The elements must retain their index, ala asort(). standard sort() would
loose the key/value pairing, so i don t think i can use it.

any help would be appreciated folks!

-- 
Sincerely,
-R
-------
"A Conscience is what hurts when everything else feels so good."


Relevant Pages

  • Re: [PHP] Re: Upload problem - final size is different
    ... > Is there a way to change the owner or the group of a file in PHP. ... Apache as 'root' then it won't work. ... It is very frightening, however, to see the group 'wheel' on the file, ... having uploaded image files in that group just doesn't feel right. ...
    (php.general)
  • Re: [PHP] Re: Upload problem - final size is different
    ... Is there a way to change the owner or the group of a file in PHP. ... Apache as 'root' then it won't work. ... It is very frightening, however, to see the group 'wheel' on the file, ... having uploaded image files in that group just doesn't feel right. ...
    (php.general)
  • Re: Need advice on ID vs. class, etc.
    ... >>We're pretty new to CSS and PHP, ... >>undertaken the design of a simplified text markup ... > Why not call it "Wheel"? ...
    (alt.html)
  • Re: PHPDebugger release preview-1.2 available
    ... BTW: I'd like to get feedback - wether positive or negative. ... In case I reinvented the wheel, I should probably stop my effort. ... that I tried to find a standalone debugging server of PHP. ...
    (comp.lang.php)