title: PHP: How to concatenate a reference to string variable?
body: <p>In the following snippet of PHP the <code>$phrases</code> needs to reflect the change made in <code>$greeting</code>. How can this be achieved? </p>
  
  <pre><code>$greeting = "Hello!";
  
  $phrases = array('greeting' =&gt; $greeting . " Glad to see you.");
  echo $phrases['greeting'];
  </code></pre>
  
  <p><em><code>Hello! Glad to see you.</code></em></p>
  
  <pre><code>$greeting = "How are you?";
  echo $phrases['greeting'];
  </code></pre>
  
  <p><em><code>Hello! Glad to see you.</code></em></p>
  
  <p>Note, that even after the value of  <code>$greeting</code> variable changed, the array remained unchanged (which is normally an expected behavior, since the value of <code>$greeting</code> var is passed by value).</p>
  
  <p>In order to make array to do change, I tried to use references to variables, but they don't seem to work with concatenation operator <code>.</code>.</p>
  
  <p>Appreciate if anyone could suggest a quick solution to this..</p>