This should be fairy straightfoward but after starring blankly at my monitor long enough, I decided to come here and ask(beg) for help. 🙂
Here is a small sample of the array that is similar to the one I'm working with for reference..
Array
(
[0] => Array
(
[ID] => 102799
[CreatedTime] => Jul 8 2004 4:10PM
[ModifiedUserID] => 86
[RevisionNumber] => 0
[ChangeNumber] => 102763
[Severity] => 100
)
[1] => Array
(
[ID] => 102762
[CreatedTime] => Jul 8 2004 6:11PM
[ModifiedUserID] => 24
[RevisionNumber] => 1
[ChangeNumber] => 102763
[Severity] => 100
)
[2] => Array
(
[ID] => 102718
[CreatedTime] => Jul 9 2004 8:03AM
[ModifiedUserID] => 11
[RevisionNumber] => 3
[ChangeNumber] => 102763
[Severity] => 100
)
[3] => Array
(
[ID] => 102611
[CreatedTime] => Jun 18 2004 2:23PM
[ModifiedUserID] => 17
[RevisionNumber] => 0
[ChangeNumber] => 102612
[Severity] => 100
)
[4] => Array
(
[ID] => 102510
[CreatedTime] => Jun 7 2004 10:43AM
[ModifiedUserID] => 24
[RevisionNumber] => 0
[ChangeNumber] => 102511
[Severity] => 100
)
)
What I would like to be able to do is to loop through this array and "pull" out similar entries that have the same ChangeNumber so that I could loop through those like numbered ChangeNumber entries outside of the larger array. In this example I have 3 unique ChangeNumbers so I would want to break the larger array into 3 smaller arrays and loop across each of those separately. Since the array I'm working with is a result set from a database, the number of entries in it is never the same, the only field being constant is the ChangeNumber.
Any advice would be greatly appreciated. I'm not sure if I've made it clear what I'm trying to do here since I'm not exactly sure what I'm trying to do in the first place. 😉
Thanks in advance. 🙂