Add uebung8
This commit is contained in:
34
cgi-bin/uebung08/list-words.php
Normal file
34
cgi-bin/uebung08/list-words.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?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 ($arr as $a) {
|
||||
$transformed = transformWord($a);
|
||||
$mask = maskWord($a);
|
||||
echo <<<END
|
||||
<tr>
|
||||
<td>$a</td>
|
||||
<td>$transformed</td>
|
||||
<td>$mask</td>
|
||||
</tr>
|
||||
END;
|
||||
|
||||
}
|
||||
|
||||
echo <<<END
|
||||
</table>
|
||||
END;
|
||||
|
||||
?>
|
Reference in New Issue
Block a user