index2b.php with loop fixed