0

I'm new to PHP and currently i face some problem in error as below
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING

Below are my code. Appreciate if someone can help to point out the error and some suggestion
Thanks a lot!!

while($row = mysqli_fetch_array($result))
{
    $movie_name = $row['movie_name']; //Error line 83
    $movie_director = $row['movie_director'];
    $movie_leadactor = $row['movie_leadactor'];

    //get director's name from people table
    get_director();

    //get lead actor's name from people table
    get_leadactor();

    $movie_details .=<<<EOD
    <tr>
        <td>$movie_name</td>
        <td>$director</td>
        <td>leadactor</td>
    </tr>

EOD;
}

Regards
Alex Ng

Edited by ngchpg: Add error line

4
Contributors
4
Replies
5
Views
5 Years
Discussion Span
Last Post by pritaeas
0

Try using mysqli_fetch_assoc instead of mysqli_fetch_array

mysqli_fetch_array includes mysqli_fetch_assoc

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.