{% else-1 %}
обрезать имя и фамилию

                        
<?php	if(!isset($_REQUEST['doGo'])){?>
<form action=4.php>
Введите ФИО <input type=text name="text" value="" size=40><br>
<input type=submit name="doGo" value="knopka">
<?php }
else {
$tas=trim($_REQUEST['text']);
$text_arr=str_split($tas);
$i=0;
while($text_arr[$i]!==" ")
{
echo $text_arr[$i]."";
$i++;
}
for($i=0; $i<count($text_arr); $i++)
{
if($text_arr[$i]==" ") echo " ".$text_arr[$i+1]."."; continue;
}
}
?>
0 27 0
Без комментариев...