Update index.php

Removed extra comment lines
Updated comments
Changed while loop to for loop