Yes, firstname and lastname are the only uniquie ones.
I improved the query now and played it outside of the foreach loop. But still don´t work. My try:
$link = mysqli_connect("localhost", "xxx", "xx", "xx");
$query = "SELECT firstname, lastname FROM mytable";
if ($result = mysqli_query($link, $query)) {
while ($row = mysqli_fetch_assoc($result)) {
echo '<table class="formatHTML5" id="myTable">';
foreach($data2['wow_accounts']['0']['characters'] as $key => $item) {
if($row["firstname"] == $item['name'] && row["lastname"] == $item['lastname'] ) {
$class_string = '';
} else {
$class_string = ' class="my-additional-class"';
}
echo '<tr>';
echo '<td>';
echo $item['firstname'];
echo '</td>';
echo '<td>';
echo $item['lastname'];
echo '</td>';
echo '<td>';
echo '<button class="btnSelect">Select</button>';
echo '</td>';
echo '</tr>';
}
echo '</table>';
}
}