|
Posted by Aggelos on 02/13/07 13:54
On Feb 13, 1:15 am, "Chuy08" <chu...@yahoo.com> wrote:
> If I have a multdimensional array like so:
>
> $records = array(
> array('product' => '30 year','rate'=> 6.0 'ProgramID' =>9514),
> array('product' => '30 year','rate'=> 6.0 'ProgramID' =>9514),
> array('product' => '30 year','rate'=> 6.0 'ProgramID' =>9517),
> array('product' => 'Pay option','rate'=> 1.0 'ProgramID' =>9513),
> array('product' => 'Pay option','rate'=> 1.0 'ProgramID' =>9513));
>
> How could I iterate through this and removing only values that are
> duplicated by ProgramID. In this example the new array should contain only
> the 1st, 3rd and 4th values. Any help appreciated.
>
> chuy
>
> --
> Posted via a free Usenet account fromhttp://www.teranews.com
I won't suggest a sollution to what you are asking.
I'll tell you to try and fix the problem in a lower level.
How is this array gennerated ?
The vlaues that are Dups shoul be used as primary keys.
So create something like that $record[$productId][$rate][$programId]
That's how I work... it makes more sense from a Relational point of
view.
Navigation:
[Reply to this message]
|