title: Inserting an image multiple times based on difference between 2 numbers. PHP
body: <p>working on a script, that calculates the difference between dates retrieved from an API. I want it to then drop in an image as many times as the difference. </p>
  
  <pre><code>$d1 = new DateTime('2012-04-04');
  $d2 = new DateTime('2012-03-31');
  
  $interval = $d1-&gt;diff($d2);
  </code></pre>
  
  <p>Ive tried to have a go with a for loop but with no success</p>
  
  <pre><code>for ($i = 0 $i &lt;= $interval; $i++) 
  { 
    echo = "&lt;img src=\"test.jpg"/";
  }
  </code></pre>
  
  <p>can you guys see any problems?</p>