PHP: Evaluating variable in string, and then changing value of variable
<p>I have a string such as the following:</p>

<pre><code>$s1 = "Apples";
$s2 = "$s1 are great";
echo $s2;
</code></pre>

<p>My understanding of PHP is that the double-quotes in the second line will cause $s1 to be evaluated within the string, and the output will be</p>

<pre><code>Apples are great
</code></pre>

<p>However, what if I wanted to keep $s2 as a "template" where I change $s1's value and then re-evaluate it to get a new string?  Is something like this possible?  For example:</p>

<pre><code>$s1 = "Apples";
$s2 = "$s1 are great";
echo $s2 . "\n";

$s1 = "Bananas";
$s3 = "$s2";
echo $s3 . "\n";
</code></pre>

<p>I find that the output for the following is:</p>

<pre><code>Apples are great 
Apples are great
</code></pre>

<p>What I am hoping to get is more like:</p>

<pre><code>Apples are great 
Bananas are great
</code></pre>

<p>Is such a thing possible with PHP where I can keep the "template" string the same, change the input variables, and then reevaluate to a new string?  Or is this not possible with PHP?</p>
