I have a multidimensional array and I want to have the output that only outputs the unique heading in “id” and “output” heading.
$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")
);
Output that I want to accomplished.
ID : 1
OUTPUTS :
file01 FBX
JPG
file03 JPL
ID : 2
OUTPUTS :
file05 FBX
file06 JPX
JPG
ID : 3
OUTPUTS :
file010 FBX
JPA
.. etc
basically combining the common IDs during echo’ing the results on page. Thanks
something like that:
and it gives the output exactly like you wanted: