Why does this loop stop my page from working? without the loop part the code runs fine. With the loop it doesn’t execute any of the page and does not print an error.
$i = 0;
while($i < 10) {
echo '<div class="feedItem">
<div class="itemDetails">
<div class="innerDetails">
<span class="itemType">type</span>
<span class="itemDate">date</span>
</div>
</div>
<span class="itemTitle">test</span>
<span class="itemCreator">by <a href="http://blankit.co.cc">chromedude</a></span>
<div class="itemTagCloud">
<span class="itemSubject">English</span>
<span class="itemTag">Test</span>
<span class="itemTag">Poem</span>
<span class="itemTag">Edgar Allen Poe</span>
</div>
</div>';
}
$iis always less than 10 (equal to 0) since you’re never changing its value. If you simply want that block to be printed10times, try adding$i++;at the bottom of your loop. This way, it increments$iby one every iteration.