Have a loop inside a loop if you are unsure how many results you will have.
For instance…
$YourArray = array();
//Add to array here.
foreach($YourArray as $LevelOne):
foreach ($LevelOne as $LevelTwo):
echo $LevelTwo . ' - ';
endforeach;
echo '<br>';
endforeach;
Would output for you.
priyaa - aarthy
testa - test member 1
5
solved How to get these array values using foreach? [closed]