title: How does preg_replace() understand '${1}1,$3' in $replacement argument?
body: <p>I am having a hard time to understand the preg_replace().<br>
  This is what I have got so far.
  <code>preg_replace($patter, $replacement, $string)</code><br>
  But, It confuses me when there is capturing groups in replacement.
  But still I get some of it. Like below</p>
  
  <p><code>preg_replace('/(\w+)/', 'hello', 'say hello!')</code> <br>
  I know it will result in 'hello hello!'.
  I can do something more with capturing group.
  <code>preg_replace('/(\w+)/','\1 Hello', 'Say World!',1)</code></p>
  
  <p>It will result in 'Say Hello World'.</p>
  
  <p>This is what I don't get.</p>
  
  <pre><code>&lt;?php
  $string = 'April 15, 2003';
  $pattern = '/(\w+) (\d+), (\d+)/i';
  $replacement = '${1}1,$3';
  echo preg_replace($pattern, $replacement, $string);
  ?&gt;
  Output:
  April1,2003
  </code></pre>
  
  <p>What <code>${1}1,$3</code> means?</p>
  
  <p>What's the difference between using <code>$1</code> <code>\1</code> and <code>&lt;\1&gt;</code>
  What does  this <code>${1}1</code> mean?</p>