This is codeproblem.php "); $inputword = "d t g c m"; $inputwordex = explode(" ",$inputword); print_r($inputwordex); $iword = 0; $decodeword = ""; while ($iword < 5) { $ialpha = 0; $found = "N"; while ($found == "N") { if ($inputwordex[$iword] == $alphaex[$ialpha]) { $i = $ialpha - 2; $decodeword = $decodeword . $alphaex[$i]; echo "
"; echo $decodeword; $found = "Y"; } else { $ialpha = $ialpha + 1; } } $iword = $iword + 1; } echo "
"; echo $decodeword; ?> This is codeproblem1.php "); $inputword = "d t g c m"; $inputwordex = explode(" ",$inputword); print_r($inputwordex); $ct = count($inputwordex); $decodeword; $iword = 0; while ($iword <= $ct - 1) { $alpha = array_search($inputwordex[$iword],$alphaex); $decodeword[$iword] = $alphaex[$alpha - 2]; $decodewd = $alphaex[$alpha - 2]; echo "
"; echo $decodewd; $iword = $iword + 1; } $rslt = implode($decodeword); echo "
"; echo $rslt; ?>