Before you get into the printing loop you should find how many rows for this district you have.
<?php
foreach ($data as $key => $value) {
if ($value->district == 'Arghakhachi') {
$district[$value->district]=$value;
}
}
And keep in mind that you should omit the first td for the next rows.
foreach ($district['Arghakhachi'] as $key=> $value) {
if($key==0){
?>
<tr>
<td rowspan="<?=count($district['Arghakhachi'])?>"><?= $value->district ?></td>
<td><?= $value->fiscal_Year ?></td>
<td><?= $value->animal_distributed_total ?></td>
<td><?= $value->total_animal_ai_ni_total ?></td>
<td><?= $value->ni_conceived_animal_total ?></td>
<td><?= $value->ni_produced_animal_total_female_male ?></td>
</tr>
<?php }else{ ?>
<tr>
<td><?= $value->fiscal_Year ?></td>
<td><?= $value->animal_distributed_total ?></td>
<td><?= $value->total_animal_ai_ni_total ?></td>
<td><?= $value->ni_conceived_animal_total ?></td>
<td><?= $value->ni_produced_animal_total_female_male ?></td>
</tr>
<?php } ?>
I did not test this. but I am sure that will work maybe with some small modifications.