title: Increment inital value in foreach with php
body: <p>I am trying to find a way to implement a counter initial variable in foreach loop. So what I need is something like this:</p>
  
  <pre><code>&lt;?php
  
  $maxAttributeSections = 15;
  $i = 1;
  
  ?&gt;
  
  &lt;table class="border"&gt;
  &lt;?php foreach ($this-&gt;{'attributeSectionAttribute' . $i} as $label =&gt; $value): ?&gt;
      &lt;tr class="attribute-pane"&gt;
          &lt;td class="attribute-pane-title" width="26%"&gt;&lt;?= $label; ?&gt;&lt;/td&gt;
          &lt;td class="attribute-pane-title border" width="74%"&gt; &lt;?= $value["text"]; ?&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;?php $i++; endforeach; ?&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>I need to loop that attributeSectionAttribute variable 15 times. So to be attributeSectionAttribute1, attributeSectionAttribute2, attributeSectionAttribute3 ... 15.</p>
  
  <p>I am kind of stuck so any help is appreciated. </p>