I need to use a `$counter` in my loop that returns a series like this : 

1 2 2 1 1 2 2 1

Sadly I'm not so good with math, whatever i tried hit a dead-end. 
this is the last thing i tried.

```
$counter = 0;

while( statement ) {
    ++$counter;

    // Making sure the second element is loaded
    if( $counter > 2 )
        $twoloaded = true;

    if( $counter >= 2 )
        --$counter;

    echo '<article class="post post-style-' . $counter . '"> ....... </article>';
}

```

In the end i need to output an HTML like this : 

```
<article class="post post-style-1">
    ...
</article>

<article class="post post-style-2">
    ...
</article>

<article class="post post-style-2">
    ...
</article>

<article class="post post-style-1">
    ...
</article>

<article class="post post-style-1">
    ...
</article>

<article class="post post-style-2">
    ...
</article>

```