title: Combine an unknown number of .mp3 files
body: <p>I have this:</p>
  
  <pre><code>$number = 1;
  $mp3 = file_get_contents("http://example.com/text=".$value);
  $file = md5($value)."-".$number.".mp3";
  file_put_contents($file, $mp3);
  $number++;
  </code></pre>
  
  <p>Result: create <code>abcdef-1.mp3</code>, <code>abcdef-2.mp3</code>, <code>abcdef-3.mp3</code>.<br>
  Now I want to combine <code>abcdef-1.mp3</code> with <code>abcdef-2.mp3</code> and <code>abcdef-3.mp3</code>.</p>
  
  <p>This works:</p>
  
  <pre><code>file_put_contents('abcdef.mp3',
  file_get_contents('abcdef-1.mp3') .
  file_get_contents('abcdef-2.mp3') .
  file_get_contents('abcdef-3.mp3'));
  </code></pre>
  
  <p>But is not suitable for my code, because <code>abcdef</code> differ. Numbers too.</p>
  
  <p>I've tried:</p>
  
  <pre><code>$number = 1;
  $mp3 = file_get_contents("http://example.com/text=".$value);
  $file = md5($value)."-".$number.".mp3";
  file_put_contents($file, $mp3);
  file_put_contents(md5($value).".mp3", file_get_contents($file));
  $number++;
  </code></pre>
  
  <p>Result: create <code>abcdef-1.mp3</code>, <code>abcdef-2.mp3</code>, <code>abcdef-3.mp3</code> and <code>abcdef.mp3</code> but when I play it's only <code>abcdef-1.mp3</code>.
  Where is the problem?</p>