title: How do you use PHP to echo a number in increments?
body: <p>I'm trying to design some elements that require less maintenance. With this process, I've been trying to figure out how to increase a number incrementally for each div on a page. Right now I'm using the 'foreach' construct to try this.</p>
  
  <p>For example: One div would have, "Issue No. 1" another div would have text that reads, "Issue No. 2" etc.</p>
  
  <pre><code>for ($issNo = 1; $issNo &lt;= 5; $issNo++) {
      echo $ContrHeadline = '&lt;h1 class="cont-heading"&gt;Issue No. ' . $issNo . ' Winter 2016&lt;/h1&gt;';
  }
  </code></pre>
  
  <p>I think I am close. Right now, the above code is outputting that variable five times. I understand why, I just can't figure out how to split up the output, and echo it under various divs.</p>
  
  <p>Below is the desired output.</p>
  
  <pre><code>Issue No. 1
  ~More content~
  
  Issue No. 2
  ~More content~
  
  Issue No. 3
  ~More content~
  
  Issue No. 4
  ~More content~
  
  Issue No. 5
  ~More content~
  </code></pre>
  
  <p>Right now I just have</p>
  
  <pre><code>Issue No. 1
  Issue No. 2
  Issue No. 3
  Issue No. 4
  Issue No. 5
  </code></pre>
  
  <p>I cannot separate the output. All of it is echoed all at once, therefore, I can't add content under each heading. I was hoping there was someway that I could store variables in an array, and assign each heading a variable with a different number increment.</p>
  
  <pre><code>$issNo = array("1","2","3","4","5");
  foreach ($issNo as $issNo) {
      echo $ContrHeadline = '&lt;h1 class="cont-heading"&gt;Issue No. ' . $issNo . ' Winter 2016&lt;/h1&gt;';
  }
  
  echo $ContrHeadline;
  </code></pre>
  
  <p>After 'echo $ContrHeadline;' Should be separate code underneath, then another instance of 'echo $ContrHeadline' with the next increment of 'Issue No.'</p>