Files
intecsync/cgi-bin/uebung08/list-words.php
2019-06-30 13:44:50 +02:00

35 lines
436 B
PHP

<?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;
foreach ((array)$arr as $a) {
$transformed = transformWord($a);
$mask = implode(" ", maskWord($a));
echo <<<END
<tr>
<td>$a</td>
<td>$transformed</td>
<td>$mask</td>
</tr>
END;
}
echo <<<END
</table>
END;
?>