PartickThistle
January 22nd, 2009, 05:02 PM
The answer to this is staring me in the face - I know it - I've done it many times before. I must have coders-block today.
I have an array like this;
[0] => stdClass Object
(
[GroupName] => Benchmarking
[GroupType] => Advisory Group
[numGroups] => 1
)
[1] => stdClass Object
(
[GroupName] => Communities Scotland Procurement Strategy Advisory Group
[GroupType] => Advisory Group
[numGroups] => 1
)
[2] => stdClass Object
(
[GroupName] => Consultation on the National Strategy
[GroupType] => Consultative Group
[numGroups] => 2
)
The database I'm pulling from is in a complete mess and there's no time to normalize it so it has to be PHP data manipulation;
Ideally I'm wanting the data to go into another array, pre-Smarty output that will output the data like so;
GroupType
GroupName (numGroups)
GroupName (numGroups)
GroupType
GroupName (numGroups)
GroupName (numGroups)
etc
etc
etc
Any hints?
I have an array like this;
[0] => stdClass Object
(
[GroupName] => Benchmarking
[GroupType] => Advisory Group
[numGroups] => 1
)
[1] => stdClass Object
(
[GroupName] => Communities Scotland Procurement Strategy Advisory Group
[GroupType] => Advisory Group
[numGroups] => 1
)
[2] => stdClass Object
(
[GroupName] => Consultation on the National Strategy
[GroupType] => Consultative Group
[numGroups] => 2
)
The database I'm pulling from is in a complete mess and there's no time to normalize it so it has to be PHP data manipulation;
Ideally I'm wanting the data to go into another array, pre-Smarty output that will output the data like so;
GroupType
GroupName (numGroups)
GroupName (numGroups)
GroupType
GroupName (numGroups)
GroupName (numGroups)
etc
etc
etc
Any hints?