|
Участник форума
Регистрация: 30.07.2008
Сообщений: 152
С нами:
9358231
Репутация:
34
|
|
Нифига. Не выходит. Короче, вот весь исходник:
PHP код:
<?php
if($_POST['string']) {
$str=preg_replace("/q/i", "%11", $_POST['string']);
$str=preg_replace("/w/i", "%12", $str);
$str=preg_replace("/e/i", "%13", $str);
$str=preg_replace("/r/i", "%14", $str);
$str=preg_replace("/t/i", "%15", $str);
$str=preg_replace("/y/i", "%16", $str);
$str=preg_replace("/u/i", "%17", $str);
$str=preg_replace("/i/i", "%18", $str);
$str=preg_replace("/o/i", "%19", $str);
$str=preg_replace("/p/i", "%20", $str);
$str=preg_replace("/a/i", "%21", $str);
$str=preg_replace("/s/i", "%22", $str);
$str=preg_replace("/d/i", "%23", $str);
$str=preg_replace("/f/i", "%24", $str);
$str=preg_replace("/g/i", "%25", $str);
$str=preg_replace("/h/i", "%26", $str);
$str=preg_replace("/j/i", "%27", $str);
$str=preg_replace("/k/i", "%28", $str);
$str=preg_replace("/l/i", "%29", $str);
$str=preg_replace("/z/i", "%30", $str);
$str=preg_replace("/x/i", "%31", $str);
$str=preg_replace("/c/i", "%32", $str);
$str=preg_replace("/v/i", "%33", $str);
$str=preg_replace("/b/i", "%34", $str);
$str=preg_replace("/n/i", "%35", $str);
$str=preg_replace("/m/i", "%36", $str);
$str=preg_replace("/,/i", "%37", $str);
$str=preg_replace("/'/i", "%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);
$str=str_replace("\%", "%", $str);
echo $str;
} else {
echo "<form action='index.php' method='POST'>";
echo "<tr><td align='right'>Строка: </td><td><input type='text' name='string' size=20></td></tr>";
echo "<tr><td></td><td><input type='submit' value='Обработать'></td></tr>";
}
?>
|