I have this foreach loop and I want only take and display the array of the largest value of buildings
this is my loop
$this->TaTarVillages = array();
foreach ($this->GetTaTaRVillages() as $value) {
$this->TaTarVillages[] = array(
'id' => $value['id'],
'player_id' => $value['player_id'],
'player_name' => $value['player_name'],
'village_name' => $value['village_name'],
'alliance_id' => $value['alliance_id'],
'alliance_name' => $value['alliance_name'],
'buildings' => $this->getWonderLandLevel($value['buildings'])
);
}
Using PHP 7