PHP
<input type="number" min="0" max="500" value="" name="qty<?php echo $key ?>" id="<?php echo $key ?>" onChange="findTotal()" />
JS
function findTotal() {
var arr = document.getElementsByName('qty');
....
}
How do I get element by name which has $key
inside?