Where am i going wrong?

Hey all,

i have this code but when i test well you will see the error:
the last closing php tag is not bold and everything else beneath it is red aswell which i know is wrong, i just can’t see where i’m going wrong??

Can anybody else?? here is my code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<?php require_once('Connections/myconnections.php'); ?>
<?php
$sql = mysql_query("SELECT * FROM mytable ORDER BY RAND() LIMIT 20");
echo '<table>
    '<tr>';
for($x=0; $r = mysql_fetch_assoc($sql); $x++){
    if($x == 4){
        echo '    </tr><tr>';
        $x=0;
    }

    echo '        <td>'.$r['word'].'</td>'."
";
}
echo '    </tr>
</table>';
?>
<body>

</body>
</html>

Cheers in advance :slight_smile: