title: If-statement in a Variable
body: <p>I want to print the same page's name differently based on a certain variable.</p>
  
  <p>Here is a corresponding code.</p>
  
  <pre><code>$metaTitle ="'if($variable=='input'){ title#1 }else {  title#2 };'";
  </code></pre>
  
  <p>And the produced meta title is lately used in the same file to create the page title (<code>&lt;title&gt;&lt;/title&gt;</code>)</p>
  
  <p>But it keeps producing the title like</p>
  
  <pre><code>if($variable=='input'){ title#1 }else {  title#2 };
  </code></pre>
  
  <p>(the whole if statement as a whole. It does not recognize the if statement. It considers the statement as a plain text.)</p>
  
  <p>What did I do wrong in the sentence??</p>