Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
kam
<?php
function find_text($text) {
$text = strtolower($text);
$dict = [
"kde" => "Nikde",
"kam" => "Nikam",
"kdy" => "Nikdy",
"jak" => "Nevim",
"co" => "Nic",
"proč" => "Nevim",
"proc" => "Nevim",
"kdo" => "Nikdo",
"koho" => "Nikoho",
];
foreach($dict as $find=>$return) {
if (false !== strpos($text, $find)) {
return $return;
}
}
$text = array("Spíš ne", "Asi", "No nevím");
return $text[array_rand($text)];
};
echo find_text('"Koho"');
if(isset($_GET['action']))
{
$text = $_POST['textbox'];
}
?>