You need to use a variable to store/remember the value that is the same between rows of data and then only start a new output row when there is a difference between the saved value and the new value.
Assuming that your code uses $row['name'] for the name data, the code would look something like this (untested pseudo code) -
$last_value = ''; // create variable and initialize it to an empty string
if($row['name'] != $last_value)
// put your code to output the "no Emp No Name" values here
$last_value = $row['name']; // save the new name as the last_value
} // end of if() statement
// put your code to output any "Ot1 Ot2 Ot3 Ot4 Ot5" values here
} // end of while() loop
If you post your existing code, someone could provide more specific code to accomplish this.