for($j=0;$j<$i;$j++)
{  <input name="Quantity[]" type="text" value=<?echo "$Q";?>>
}
象你上面的那种循环一百次也一样.
你这样看看.