<
html>
<head>
<title>Char-Sorter</title>
<style type="text/css">
<!--
body {
font-family: Tahoma;
}
-->
</style>
</head>
<body>
<?php
$word = trim($_GET['word']);
$word2 = count_chars($word, 1);
include 'list.php';
echo 'Es sind [b]'. count($wordlist) .'[/b] Wörter in der Liste vorhanden.
';
$possible = array();
$i = 0;
while ($i < count($wordlist)) {
if ($word2 == count_chars($wordlist[$i], 1)) {
$possible[] = $wordlist[$i];
}
$i++;
}
if (count($possible)) {
echo 'Möglichkeiten:
';
$i = 0;
while ($i < count($possible)) {
echo ($i + 1) .': [b]'. $possible[$i] .'[/b]
';
$i++;
}
}
$word2 = count_chars(strtolower($word), 1);
$possible = array();
$i = 0;
while ($i < count($wordlist)) {
if ($word2 == count_chars($wordlist[$i], 1)) {
$possible[] = $wordlist[$i];
}
$i++;
}
if (count($possible)) {
echo 'Möglichkeiten (kleingeschrieben):
';
$i = 0;
while ($i < count($possible)) {
echo ($i + 1) .': [b]'. $possible[$i] .'[/b]
';
$i++;
}
}
$possible = array();
$i = 0;
while ($i < count($wordlist)) {
if ($word2 == count_chars(strtolower($wordlist[$i]), 1)) {
$possible[] = $wordlist[$i];
}
$i++;
}
if (count($possible)) {
echo 'Möglichkeiten (verglichen mit kleingeschriebener Wortliste):
';
$i = 0;
while ($i < count($possible)) {
echo ($i + 1) .': [b]'. $possible[$i] .'[/b]
';
$i++;
}
}
?>
</body>
</
html>