I broke this down and tested each section. Somehow i am missing something in the last line of my code. I could use some helping eyes. Here is my error [b]"Parse error: syntax error, unexpected $end in /home/wekillmo/public_html/tablemaker.php on line 37"[/b] [code] <html> <table border="0" CELLSPACING="0" CELLPADDING="10" align="center"> <?php //db connect and select $db = @mysql_connect("localhost", "XXX", "XXX"); if( ! ($db = @mysql_connect("localhost", "name", "password")) ) { } else { mysql_select_db("XXX",$db) or die("Select DB Error: ".mysql_error()); } $result=mysql_query ("SELECT * FROM XXX"); $count = 1; $column = 1; //loop statement while($myrow = mysql_fetch_array($result)) { { // first column display if ($column == 1) { //field is the column in your table printf("<tr><td>%s</td>",$myrow["name"]); } else{ //second column display printf("<td>%s</td></tr>",$myrow["class"]); } $count += 1; $column = $count % 2; } ?> </table> </html> [/code]