Salve, nel mio script c'è un getElementById, che ho usato centinaia di volte ma questa volta mi dice "getElementById not definied"

Codice PHP:
<script type="text/javascript">document.write(getElementById("qnt<? echo $y;?>").value)</script>&euro;
chi mi sa aiutare?