i'm running a for loop to write table rows in the table as follows. The problem is when i run the code it makes table within a table. I just want to write one table and run the loop to add table rows
estr='<table border=0 cellpadding="0" cellspacing="0">'
estr+='<tr><td align="left">'
for (i=0;i<menu1.length;i++)
document.write(estr+menu1+'</td></tr></table>')
estr='<table border=0 cellpadding="0" cellspacing="0">'
estr+='<tr><td align="left">'
for (i=0;i<menu1.length;i++)
document.write(estr+menu1+'</td></tr></table>')