p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 (http://p2p.wrox.com/forumdisplay.php?f=160)
-   -   Ch 4: Parse error: syntax error, unexpected T_SL (http://p2p.wrox.com/showthread.php?t=68967)

hanizar77 June 23rd, 2008 09:17 PM

Ch 4: Parse error: syntax error, unexpected T_SL

Begining PHP is a good reference for me. However, i face an issue while browsing this book. I think its the heredoc issue.

Chapter 4, page 114.

Parse error: syntax error, unexpected T_SL in D:\wamp\www\testing\table1.php on line 14

$link = mysql_connect("localhost","bp5am","bp5ampass")
  or die(mysql_error());
  or die (mysql_error());

$query = "SELECT movie_name, movie_director, movie_leadactor " .
         "FROM movie";

$result = mysql_query($query, $link)
  or die(mysql_error());
$num_movies = mysql_num_rows($result);

$movie_header =<<<EOD
<h2><center>Movie Review Database</center></h2>
<table width="70%" border="1" cellpadding="2"
       cellspacing="2" align="center">
    <th>Movie Title</th>
    <th>Year of Release</th>
    <th>Movie Director</th>
    <th>Movie Lead Actor</th>
    <th>Movie Type</th>

$movie_details = '';
while ($row = mysql_fetch_array($result)) {
  $movie_name = $row['movie_name'];
  $movie_director = $row['movie_director'];
  $movie_leadactor = $row['movie_leadactor'];

  $movie_details .=<<<EOD

$movie_details .=<<<EOD
    <td>Total :$num_movies Movies</td>

All times are GMT -4. The time now is 05:06 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.