Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Detecting increments of 12

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #28939
    brianatlarge
    Member

    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:

    Code:

    house

    THUMB;
    if ($i == 11 || $i == 23 || $i == 35 || $i == 47 || $i == 59 || $i == 71 || $i == 83) {
    echo <<

    PANEL;
    }
    }
    ?>

    As you can see, it’s this part that needs improving:

    Code:
    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.

    #75125
    brianatlarge
    Member

    Wow. That was easy. I’ll have to remember that.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.