title: Countdown array of numbers in PHP
body: <p>I have an array of numbers: <code>$arr=[25,10,12]</code>. </p>
  
  <p>I want to create another array with several arrays that are a "countdown" of the original array such that the final array (in the new array) has only zeros like so <code>[0,0,0]</code>;</p>
  
  <p>I expect an output like so:</p>
  
  <pre><code>[25,10,12]
  [25,10,11]
  [25,10,10]
     :
  [25,10,0]
     :
  /* An element "resets" if the first element is not yet zero */ 
  [25,9,12] 
  [25,9,11]
     :
  [10,10,12]
  [10,10,11]
     :
  [0,0,1]
  [0,0,0]
  
  </code></pre>