You can just return the array from function and then loop in your script
while($row = $result->fetch_assoc())
{
$rows[] = $row;
}
return $rows;
The you can loop in your script
$test = $connectTest->grabResults(test, id, id);
foreach($test as $value)
{
print_r($value);
}
Upon OP edit
If you need to print them separate you can access all elements with variable name and scopes with keys as follow
$test = $connectTest->grabResults(test, id, id);
echo '<table>';
foreach($test as $value)
{
echo '<tr>
<td>'.$value['id'].'</td>
<td>'.$value['name'].'</td>
<td>'.$value['status'].'</td>
</tr>';
}
echo '</table>';