title: Cannot Increment Object variable?
body: <p>So i am trying to increment the $i in the actual call if that makes sense, please look at the code to understand:</p>
  
  <pre><code>&lt;?php
      for ($i=0; $i &lt; 8 ; $i++) { ?&gt;
        &lt;td&gt;&lt;img src="http://ddragon.leagueoflegends.com/cdn/6.6.1/img/item/&lt;?php echo $game-&gt;stats-&gt;item.$i; ?&gt;.png"&gt;&lt;/img&gt;&lt;/td&gt;
  &lt;?php }
  ?&gt;
  </code></pre>
  
  <p>essentially what i need to do is increment it like follows:</p>
  
  <pre><code>$game-&gt;stats-&gt;item1
  $game-&gt;stats-&gt;item2 etc..
  </code></pre>