|
Динозавр
Регистрация: 10.01.2008
Сообщений: 2,841
Провел на форуме: 9220514
Репутация:
3338
|
|
PHP код:
<?php
$submit = $_POST['submit'];
$string = $_POST['string'];
if(isset($submit) && !empty($string)) {
$str=str_replace("%11", "q", $string);
$str=str_replace("%12", "w", $str);
$str=str_replace("%13", "e", $str);
$str=str_replace("%14", "r", $str);
$str=str_replace("%15", "t", $str);
$str=str_replace("%16", "y", $str);
$str=str_replace("%17", "u", $str);
$str=str_replace("%18", "i", $str);
$str=str_replace("%19", "o", $str);
$str=str_replace("%20", "p", $str);
$str=str_replace("%21", "a", $str);
$str=str_replace("%22", "s", $str);
$str=str_replace("%23", "d", $str);
$str=str_replace("%24", "f", $str);
$str=str_replace("%25", "g", $str);
$str=str_replace("%26", "h", $str);
$str=str_replace("%27", "j", $str);
$str=str_replace("%28", "k", $str);
$str=str_replace("%29", "l", $str);
$str=str_replace("%30", "z", $str);
$str=str_replace("%31", "x", $str);
$str=str_replace("%32", "c", $str);
$str=str_replace("%33", "v", $str);
$str=str_replace("%34", "b", $str);
$str=str_replace("%35", "n", $str);
$str=str_replace("%36", "m", $str);
$str=str_replace("%37", ",", $str);
$str=str_replace("%38", "'", $str);
$str=str_replace("%39", '"', $str);
$str=str_replace("%40", "/", $str);
$str=str_replace("%41", ".", $str);
$str=str_replace("%42", ";", $str);
$str=str_replace("%43", ":", $str);
$str=str_replace("%44", "<", $str);
$str=str_replace("%45", ">", $str);
echo $str;
} else {
echo "<form method='POST'>";
echo "<tr><td align='right'>String: </td><td><input type='text' name='string' size=20></td></tr>";
echo "<tr><td></td><td><input type='submit' name = 'submit' value='Go'></td></tr></form>";
}
?>
Изменения не только в str_replace, смотри весь код
ЗЫЖ А вообще ппц, конечно 
|