Estáis fallando todos en lo mismo o me lo parece a mi?
Estáis usando las variables como si fuera ASP o Javascript. Las variables llevan $ delante.
Código PHP:
Ver original<?php
for ($x=0;$x<=10;$x++) {
?>
<input type=text name=uploads[<?php echo $x;?>] id=attachId0 size=30><input type=button value="borrar" id=idAttachOper0 onclick="return delInput('idfilespan',<?php echo $x;?>)">
<?php
}
?>