diff --git a/main.php b/main.php new file mode 100644 index 0000000..0f35729 --- /dev/null +++ b/main.php @@ -0,0 +1,37 @@ + + + + + + haupt + + + + +query("SELECT id FROM `unileipzig-en`,`unileipzig-de` WHERE wort='$falscheswort'"); +if($vorhanden->num_rows ==1) { + echo "

Das Wort ist richtig

"; + exit; +} +$ergebnis = $mysqli->query("SELECT wort FROM `unileipzig-en`,`unileipzig-de`"); +// echo "\n"; +$arrayahnlich =array(); // leeres Array erstellen +while ($wort = $ergebnis->fetch_array()) { + $ahnlichkeit=levenshtein($falscheswort, $wort[0]); +// echo ""; + $arrayahnlich[$wort[0]] = $ahnlichkeit; +} +asort($arrayahnlich); +$top = array_keys($arrayahnlich); +echo "$top[0],$top[1],$top[2],$top[3]"; + +?> +
$wort[0]$ahnlichkeit
+ +