# Where am i going wrong?

**URL:** <https://forum.kirupa.com/t/where-am-i-going-wrong/226783>\
**Category:** Uncategorized\
**Created:** [May 23, 2007, 11:26pm UTC](https://forum.kirupa.com/t/where-am-i-going-wrong/226783 "2007-05-23T23:26:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flash\_Man1](https://avatars.discourse-cdn.com/v4/letter/f/8797f3/32.png) [@Flash\_Man1](https://forum.kirupa.com/u/Flash_Man1)\
**Post date:** [May 23, 2007, 11:26pm UTC](https://forum.kirupa.com/t/where-am-i-going-wrong/226783/1 "2007-05-23T23:26:46Z")

</div>

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:

```php
<!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 🙂
