Basically what I'd like to do is detect when the index of a loop reaches increments of 12 and then do something else. Right now, my code looks like this:
<?php //Grab thumbnails and display them $files = glob(\"images/gallery/thumb/*.{jpg,gif,png}\", GLOB_BRACE); for ($i = 00; $i<count($files); $i++) { echo <<<THUMB <li><a id='house$i'> <img src='$files[$i]' alt=\"house\"/></a> </li>
As you can see, it's this part that needs improving:
if ($i == 11 || $i == 23 || $i == 35 || $i == 47 || $i == 59 || $i == 71 || $i == 83) {This code works fine as is, but I'd like for it to not break if the number goes above what is hard coded in.
So I think something like
if ($i % 12 == 0){
}