<?php 

require_once(__DIR__ . "/hangman_lib.php");


$arr = getAllWords();

echo <<<END
<table style="width:100%">
  <tr>
    <th>Wort</th>
    <th>Zu raten</th>
    <th>Maske</th>
  </tr>
END;

for ($i = 0; $i < count($arr); $i++) {
    $transformed = transformWord($arr[$i]);
    $mask = implode(" ", maskWord($arr[$i]));
echo <<<END
<tr>
    <td>$arr[$i]</td>
    <td>$transformed</td>
    <td>$mask</td>
</tr>
END;
    
}

echo <<<END
    </table> 
END;

?>
