title: Determine if the array has negative numbers and change them to zero
body: <p>I have wrote this code:</p>
  
  <pre><code>$final = array(
      ($data[0] - $data[1]),
      ($data[1] - $data[2]), 
      ($data[2] - $data[3]),
      ($data[3] - $data[4]),
      ($data[4] - $data[5]), 
      ($data[5] - $data[6]) 
  );
  </code></pre>
  
  <p>Some of them will return negative numbers (<code>-13</code>,<code>-42</code> etc...), how to change the negative ones to <code>0</code>?</p>
  
  <p>By the way the think i do after is:</p>
  
  <pre><code>$data_string = join(",", $final);
  </code></pre>
  
  <p><strong>Example:</strong> I need to convert it like in the following:</p>
  
  <pre><code>1,3,-14,53,23,-15 =&gt; 1,3,0,53,23,0
  </code></pre>