I'm having hard time imaging why the need for array layout like the
latter -- implementation or algorithm where this array needed may have
a rethinking.

...but, and I'm not math expert (well, this isn't a question of math
anyway), you could just...

1) sort the 1st array
2) you can now take first 2 largest value and least value (exclude 0),
store them somewhere
3) fill the 2nd array with the stored value with for/foreach loop.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to