seeking help building a function
From: tlhingan1 (Spamtlhingan1SPAM_at_SPAMoptonlineSPAM.SPAMnetMaps)
Date: 10/09/04
- Next message: Aggro: "Re: Viewing checkbox data with MySQL and PHP"
- Previous message: Hugh Cowan: "Building GUI Apps with PHP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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."
- Next message: Aggro: "Re: Viewing checkbox data with MySQL and PHP"
- Previous message: Hugh Cowan: "Building GUI Apps with PHP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|