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 lead actor's name from people table

    $movie_details .=<<<EOD


Alex Ng

Recommended Answers

All 4 Replies

This part of your code looks fine, are you sure it is not triggered by the lines before this?

Try using mysqli_fetch_assoc instead of mysqli_fetch_array

Try using mysqli_fetch_assoc instead of mysqli_fetch_array

mysqli_fetch_array includes mysqli_fetch_assoc

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.