I have a multidimensional array, and I want to get output that outputs only a unique header to the id and output headers.
$job_rows = array(
array("id" => 1, "output" => "file01", "output_type" => "FBX"),
array("id" => 1, "output" => "file01", "output_type" => "JPG"),
array("id" => 1, "output" => "file03", "output_type" => "JPL"),
array("id" => 2, "output" => "file05", "output_type" => "FBX"),
array("id" => 2, "output" => "file06", "output_type" => "JPX"),
array("id" => 2, "output" => "file06", "output_type" => "JPG"),
array("id" => 3, "output" => "file010", "output_type" => "FBX"),
array("id" => 3, "output" => "file010", "output_type" => "JPA")
);
The result that I want to accomplish.
ID : 1
OUTPUTS :
file01 FBX
JPG
file03 JPL
ID : 2
OUTPUTS :
file05 FBX
file06 JPX
JPG
ID : 3
OUTPUTS :
file010 FBX
JPA
.. etc
basically aggregates common identifiers during echo results on a page. Thanks
source
share