title: add variable seconds to time foreach loop
body: <p>I'm building a queue to generate something and I want it visible for users to see how long it will take till the generation is ready. </p>
  
  <p>So I have an estimated time it takes to generate something, but that is a variable because it can be anywhere between 5-120 seconds. And now I need to add the variable time to the time of the day and make a loop because the queue has more values. </p>
  
  <p>So for example I need this:</p>
  
  <p>Object 1 - Estimated generation time: 15 sec - 09:00:15</p>
  
  <p>Object 2 - Estimated generation time: 20 sec - 09:00:35</p>
  
  <p>Object 3 - Estimated generation time: 10 sec - 09:00:45</p>
  
  <p>And so on.. </p>
  
  <p>I already tried this:</p>
  
  <pre><code>$my_time = date('h:i:s',time());
  $seconds2add = $estimated_time;
  
  $new_time= strtotime($my_time);
  $new_time+=$seconds2add;
  
  echo date('h:i:s',$new_time);
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>$time = date("m/d/Y h:i:s a", time() + $estimated_time);
  </code></pre>
  
  <p>It loops but both gives me like this output:</p>
  
  <p>Object 1 - Estimated generation time: 15 sec - 09:00:15</p>
  
  <p>Object 2 - Estimated generation time: 20 sec - 09:00:20</p>
  
  <p>Object 3 - Estimated generation time: 10 sec - 09:00:10</p>
  
  <p>So how can I make it loop that it works?</p>
  
  <p><strong>Edit: This is my loop</strong></p>
  
  <pre><code>$this_time = date('h:i:s',time());
  $my_time = $this_time;
  $num = 1;
  foreach($orders as $order) {
      echo '&lt;tr&gt;'
      . '&lt;td&gt;'.($num++).'&lt;/td&gt;'
      . '&lt;td&gt;'. $order-&gt;url .'&lt;/td&gt;'
      . '&lt;td&gt;'. $order-&gt;product_desc .'&lt;/td&gt;'
      . '&lt;td&gt;'. $order-&gt;size .' cm&lt;/td&gt;'
      . '&lt;td&gt;'. $order-&gt;estimated_time .' sec&lt;/td&gt;';
  
  $seconds2add = $order-&gt;estimated_time;
  $my_time= strtotime($my_time);
  $my_time+=$seconds2add;
      echo '&lt;td&gt;'. date('h:i:s',$my_time) . '&lt;/td&gt;'
      . '&lt;/tr&gt;';        
  } 
  </code></pre>