Как да оправя тази грешка ?

pechkata

Registered
Код:
<table style="width: 100%; font-size:11px; text-align:center;border-collapse: collapse;">
<tr style="height:10px;">
<td style="border: 1px solid #474747; color:white; height: 22px; background: black;">Ник</td>
<td style="border: 1px solid #474747; color:white; height: 22px; background: black;">Админ</td>
<td style="border: 1px solid #474747; color:white; height: 22px; background: black;">Сървър</td>
<td style="border: 1px solid #474747; color:white; height: 22px; background: black;">Причина</td>
<td style="border: 1px solid #474747; color:white; height: 22px; background: black;">Време</td>
</tr>
<?php
mysql_connect("localhost","root","parola");
mysql_select_db("db_na_gm/amxbans");

$checked = mysql_query("SELECT * FROM amx_bans ORDER BY bid DESC LIMIT 5") or die(mysql_error());
mysql_query("SET NAMES UTF8");
$proverka = mysql_num_rows($checked);
if ($proverka < 1)
{
echo "Няма налични банове";
}
else
{
while($chk = mysql_fetch_array($checked))
{
$name = htmlspecialchars($chk['player_nick']);
$admin = htmlspecialchars($chk['admin_nick']);
$bancreate = htmlspecialchars($chk['ban_created']);
$server = htmlspecialchars($chk['server_name']);
$lenght = htmlspecialchars($chk['ban_length']);
$reason = htmlspecialchars($chk['ban_reason']);

echo '
<tr style="height:35px;">
<td style="border: 1px solid #474747; width: 20%;">'.$name.'</td>
<td style="border: 1px solid #474747; width: 20%;">'.$admin.'</td>
<td style="border: 1px solid #474747; width: 20%;">'.$server.'</td>
<td style="border: 1px solid #474747; width: 20%;">'.$reason.'</td>
';
if($lenght == 0){
echo 'Перманентен';
}else{
<td style="border: 1px solid #474747; width: 20%;">'.$lenght.'</td>
}
$final = mysql_query("SELECT * FROM amx_bans ORDER BY bid DESC") or die(mysql_error());
echo '
</tr>
';
}
}
?>
</table>


Какво не му е наред с този код ? Вади ето тази грешка :
Parse error: syntax error, unexpected '<' in ***************************** on line 41
 
Не си сложил echo на реда.

Направи го така:
PHP:
echo '<td style="border: 1px solid #474747; width: 20%;">'.$lenght.'</td>';
 

Горе