" . $proposed . " -> ", "", " -> " . $myp . " -> ")) == strlen(" -> " . $myp . " -> ") && strlen(str_replace(">" . $proposed . "<", "", ">" . $rest . "<")) == strlen(">" . $rest . "<")) {
if (strpos($mywords[$ii], " (antonym)") !== false) {
$selname = "";
$rest = str_replace("", "", $rest);
//echo " | " . str_replace(" (antonym)", "", $mywords[$ii]) . " |
";
} else {
$selname = "";
$rest = str_replace("", "", $rest);
//echo "" . str_replace(" (antonym)", "", $mywords[$ii]) . " | |
";
}
}
}
}
if ($selname != "") {
$selname = "";
$rest .= "<" . "script type='text/javascript'> alert('Oh well ... it is the end of the line ... and you scored " . $score . "'); " . "script" . ">";
$myp = str_replace("~", "", str_replace(" -> ~", "", ($myp . "~")));
$mypp = str_replace("~", "", str_replace(" -> ~", "", ($mypp . "~")));
}
} else {
$startword = file_get_contents("http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . "/PHP/surprise.php?min=4&max=8");
$callbit = "?score=1&goes=1&1=" . $startword . "&2=";
$rest = " Optionally Email Snapshot of Game / Chat";
$myp = $startword . " -> ";
$mypp = $startword . " -> ";
$mypbefore = $startword . " -> ";
$thewordis = $startword;
$selname = urldecode($thewordis);
}
}
//if ($rest == "") $rest = "";
$instructions = str_replace('""', '"' . $mypp . '"', $instructions);
?>
English Word Association Game - RJM Programming - January, 2015