function downloads{
$DB->Query("SELECT r.dl_type, d.path_ref FROM dl d, ref_dl_types r WHERE d.dl_type_ref = r.id AND d.property_id_ref = '$this->property_id'", 'downloads');
while($row = $DB->Fetch('downloads'))
$this->downloads[] = $row;
}
so i have the above function pulling information from the data base and it's working fine. It returns:
Array ( [0] => Array ( [dl_type] => general flyer [path_ref] => documents/usc_general_flyer.pdf ) [1] => Array ( [dl_type] => aerial photo [path_ref] => images/usc_aerial1.jpg ) [2] => Array ( [dl_type] => aerial photo [path_ref] => images/usc_aerial2.jpg ) )
What I want to do is group the arrays with similar keys (in this case: Aerial Photo) so that it returns:
Array ([0] => Array ( [dl_type] => general flyer [path_ref] => documents/usc_general_flyer.pdf ) [1] => Array ( [dl_type] => aerial photo [path_ref] => Array (images/usc_aerial1.jpg, images/usc_aerial2.jpg)
I'm probably overthinking this... and would appreciate any help.