PHP. Issue with incrementor
<p>I have this code:</p>

<pre><code>&lt;?php

$html=&lt;&lt;&lt;EOF  
    &lt;p&gt;{${$var[$n++]}[name]}&lt;/p&gt;    
EOF;

$array=array(0,1,2,3,4,5,6);

for ($y = 0; $y &lt; count($array) / 3; ++$y)
    { echo $html; }

?&gt;
</code></pre>

<p>And for every loop <code>$n</code> is counted from the beginning: 0,1,2 → 0,1,2 → 0.</p>

<p>What should I do if I want continued <code>$n</code>: 0,1,2 → 3,4,5 → 6?</p>

<hr>

<h2>Live example</h2>

<pre><code>&lt;?php

$vps_de_ctt_s1=array(       
    "name"=&gt; "Xen VPS 200",
    // etc      
);  

$vps_de_ctt_s2=array(       
    "name"=&gt; "Xen VPS 400",
    // etc      
);  

// etc

$dc_id_tmp=array(
    "vps_de_ctt_s1",
    "vps_de_ctt_s2",
    "vps_de_ctt_s3",

    "vps_de_ctt_s4",
    "vps_de_ctt_s5",
    "vps_de_ctt_s6",

    "vps_de_ctt_s7"
);

$html=&lt;&lt;&lt;EOF
&lt;tr&gt;
    &lt;td class="column-left"&gt;&amp;nbsp;
    &lt;/td&gt;
    &lt;td class="column-right"&gt;
        &lt;h5&gt;{${$dc_id_tmp[$i++]}[name]}&lt;/h5&gt;
    &lt;/td&gt;
    &lt;td class="column-right"&gt;
        &lt;h5&gt;{${$dc_id_tmp[$i++]}[name]}&lt;/h5&gt;
    &lt;/td&gt;
    &lt;td class="column-right"&gt;
        &lt;h5&gt;{${$dc_id_tmp[$i++]}[name]}&lt;/h5&gt;
    &lt;/td&gt;
&lt;/tr&gt;
EOF;

?&gt;

&lt;?php for ($y = 0; $y &lt; count($dc_id_tmp) / 3; ++$y)    
    { echo $html; }    
?&gt;
</code></pre>

<hr>

<p>Garbage text for word count. Can't update post without it. Garbage text for word count. Can't update post without it. Garbage text for word count. Can't update post without it. Garbage text for word count. Can't update post without it. Garbage text for word count. Can't update post without it.</p>
