', '', $templategame); $templategame=str_replace('>Game<', '>Australian Street Types Game ... drag to matching correct answer to score<', $templategame); $templategame=str_replace('>', '>' . $scorebit . '', $templategame); $thepsource=explode('f0;">', explode("

", $templategame)[0])[-1 + sizeof(explode('f0;">', explode("

", $templategame)[0]))]; $templategame=str_replace(', 2023<', ', 2023 ... thanks to https://en.wikipedia.org/wiki/Street_suffix<', $templategame); $templategame=str_replace('>Reset example<', ' style="display:none;">Reset example<', $templategame); //echo $crandlist . "\n" . $thepsource . "\n" . $correctans . "\n"; //exit; //echo $crandlist . "\n"; //echo "" . $randlist[$correctans] . "\n" . $wikidescriptions[$randlist[$correctans]] . "\n" . $wikidesignations[$randlist[$correctans]]; //exit; if ($randmode == 0) { // designation up top and descriptions in drop zone $templategame=str_replace('>' . (1 + $correctans) . '<', ' data-answer="' . $wikidescriptions[$randlist[$correctans]] . '">' . $wikidescriptions[$randlist[$correctans]] . '<', $templategame); $templategame=str_replace('>' . $thepsource . '<', ' data-answer="' . $wikidescriptions[$randlist[$correctans]] . '">' . $wikidesignations[$randlist[$correctans]] . '<', $templategame); for ($i=1; $i<=9; $i++) { if ((-1 + $i) != $correctans) { $templategame=str_replace('>' . $i . '' . $wikidescriptions[$randlist[-1 + $i]] . '' . (1 + $correctans) . '<', ' data-answer="' . $wikidesignations[$randlist[$correctans]] . '">' . $wikidesignations[$randlist[$correctans]] . '<', $templategame); $templategame=str_replace('>' . $thepsource . '<', ' data-answer="' . $wikidesignations[$randlist[$correctans]] . '">' . $wikidescriptions[$randlist[$correctans]] . '<', $templategame); for ($i=1; $i<=9; $i++) { if ((-1 + $i) != $correctans) { $templategame=str_replace('>' . $i . '' . $wikidesignations[$randlist[-1 + $i]] . '