title: PHP: increment name of variable in a for loop
body: <p>The for loop fails because "$" is an invalid variable character:</p>
  
  <pre><code>&lt;?php 
  $num1 = "Number 1";
  $num2 = "Number 2";
  $num3 = "Number 3";
  
  for ($i = 0; $i &lt; 3; $i++) {
      echo $num$i . "&lt;br&gt;";
  }
  ?&gt;
  </code></pre>
  
  <p>(I didn't understand <a href="https://stackoverflow.com/questions/16906665/php-increment-name-of-variable-in-a-loop">this question</a>)</p>