fixed a bug in elec.php

changed the counter $i to $j