dentro il for

$my_array[$i]

cicli $i, non $conto