
03.04.2010, 12:59
|
|
Познавший АНТИЧАТ
Регистрация: 23.08.2007
Сообщений: 1,237
С нами:
9851426
Репутация:
1676
|
|
PHP код:
<?php
if(isset($_POST['str']) && !empty($_POST['str']) && !is_array($_POST['str']) && strlen($_POST['str']) == 8)
{
$str = $_POST['str'];
for($i=2,$j=strlen($str);$i<=$j;$i+=2)
print substr($str, -$i, 2);
}
else
{
print<<<HERE
<form method="post">
<input type="text" name="str">
<input type="submit" value="OK">
</form>
HERE;
}
?>
|
|
|