title: Using PHP inside quotes
body: <p>I am trying to repopulate the post value of a text box in php. My html is built dynamically using a string and I am struggling with single and double quotes in the html string while using the php code. Below is my code</p>
  
  <pre><code>function setTestboxValue(){
  
          $text = "&lt;form action = '' method = 'post'&gt;
                     &lt;input type='text'  name='title' 
                      value='&lt;?php echo isset($_POST['textValue']) ? $_POST['textValue'] : '' ?&gt;' 
                         placeholder = 'book name' /&gt;                       
                      &lt;input type = 'submit' value = 'Search' /&gt;
                      &lt;/form&gt;";
          return $text;
  }
  </code></pre>
  
  <p>I am facing issue with "Possible Syntax error. unexpected variable: $_POST". Would really appreciate if some one can help me with this issue.</p>
  
  <p><strong>Disclaimer:</strong>
  I started working on php since a week, so I am an absolute newbie to php.</p>