I wrote the following loop since I have to repeat the same/similar code 25 times. I may need to repeat more, but for now it’s at 25.
<?php
for ($i = 0; $i <= 24; $i++) {
echo "<div class=\"";
if ($i = 0) {
echo "overlay";
} else {
echo "layer"+$i;
}
echo "\">code</div>\n";
}
?>
When uploaded to my website, it takes forever to load and then pulls resources from my computer and eventually makes the computer slow.
Try changing:
to:
You’re setting $i to 0 on each iteration, not comparing it.