vediamo un pò se nell'array hai caratteri che non sono numeri
devi mettere
b='$c[b]'