Well, I think the problem is with how you are handling the array. row[0] refers to the first row, and row[1] refers to the 2nd row, NOT the 2nd part of row[0].
You can call the componets of the row by number or name.
ie: if you want to access the id and name for the first row, you would
echo("
<INPUT TYPE=TEXT NAME='Id' VALUE=\"$row[0][id]\"><br>
<INPUT TYPE=TEXT NAME='Name' VALUE=\"$row[0][name]\">
");
And accessing the second row would be the same, only it would be row[1] instead of row[0].
I hope that makes sense. There are lots of ways you can increment through your list as well.