I'm returning an array much like the simplified example below:
0 =>
object(stdClass)[9]
public 'crew_chief' => string 'Alan' (length=4)
public 'location' => string '1a' (length=2)
1 =>
object(stdClass)[22]
public 'crew_chief' => string 'Alan' (length=4)
public 'location' => string '2a' (length=2)
I would like my loop over my array and remove certain duplicate info (in this case "Alan")
Desired output would look like the below in a HTML table row <tr>
:
Alan
1a
2a
I have tried:
foreach($records as $r) {
<tr>
<td>
$r->crew_chief;
</td>
<td>
$r->location . <br />;
</td>
</tr>
}