unexpected T_Variable error, what is causing it in loop?
<p>I ma receiving an error stating:</p>

<p>Parse error: syntax error, unexpected T_VARIABLE in .... on line 599</p>

<p>which belongs in the line below: </p>

<pre><code>foreach ($questions as $key=&gt;$question) {

    echo '&lt;p&gt;&lt;strong&gt;Question:&lt;/strong&gt; ' .htmlspecialchars($row_question['question_num'][$key]). ': ' .htmlspecialchars($row_question['question_content']$key]). '&lt;/p&gt;' . PHP_EOL;

    }
</code></pre>

<p>What am I doing incorrectly?</p>

<p>Below is code:</p>

<pre><code>    $question = array();

    while ($selectedstudentanswerstmt-&gt;fetch()) {

    $row_question = array();
    $row_question['question_num'] = $detailsQuestionNo;
    $row_question['question_content'] = $detailsQuestionContent;
    $row_question['question_option'] = $detailsOptionType;
    $row_question['question_num_answers'] = $detailsNoofAnswers;
    $row_question['question_answer'] = $detailsAnswer;
    $row_question['questionnum_reply'] = $detailsReplyType;
    $row_question['questionnum_marks'] = $detailsQuestionMarks;
    $questions[] = $row_question;
}

.................

&lt;?php   

          foreach ($questions as $key=&gt;$question) {

echo '&lt;p&gt;&lt;strong&gt;Question:&lt;/strong&gt; ' .htmlspecialchars($row_question['question_num'][$key]). ': ' .htmlspecialchars($row_question['question_content']$key]). '&lt;/p&gt;' . PHP_EOL;

}
?&gt;
</code></pre>
