title: I have a parse error in my php code
body: <p>I have a piece of code which I am struggling on. I want the onclick function to display the "Question" row in the function but when I place <code>'$questionrow['QuestionContent']'</code> within the brackets, it is giving me an error stating: </p>
  
  <p>Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /xxx7/Mobile_app/previousquestions.php on line 119</p>
  
  <p>How do I place the QuestionContent within the brackets correctly in function below:</p>
  
  <pre><code> onclick='parent.addwindow('$questionrow['QuestionContent']');'&gt;Add&lt;/button&gt;
  </code></pre>
  
  <p>Below is whole code:</p>
  
  <pre><code>&lt;?php
  
  $output = "";
  
          while ($questionrow = mysql_fetch_assoc($questionresult)) {
  $output .= "
  &lt;table&gt;
        &lt;tr&gt;
  &lt;td class='questiontd'&gt;{$questionrow['QuestionContent']}&lt;/td&gt;
        &lt;td class='addtd'&gt;&lt;button type='button' class='add' onclick='parent.addwindow('$questionrow['QuestionContent']');'&gt;Add&lt;/button&gt;&lt;/td&gt;
        &lt;/tr&gt;";
          }
          $output .= "        &lt;/table&gt;";
  
          echo $output;
  
          ?&gt;
  </code></pre>