PHP MySQL error?

From: Date: Fri, 25 Aug 2000 19:06:49 +0000
Subject: PHP MySQL error?
Groups: php.general 
Request: Send a blank email to php-general+get-13702@lists.php.net to get a copy of this message
Hello...this is my first post. I am new to PHP and to MySQL and am having trouble. I am going through a book..."PHP Essentials" and following the examples. I am trying to display data from a table. I believe I have copied the code correctly from the book...but I get the following error when running the script: Parse error: parse error, expecting STRING' or NUM_STRING' or `'$'' in /home/sites/home/users/admin/web/phpessentials/display_products.php3 on line 30 Here is a snip of the code: <SNIP> echo "<TABLE BORDER=1>"; echo "<tr><th>Item ID</TH><TH>Item Title</TH><TH>Item Description</TH><TH>Item $ while($row = mysql_fetch_array($sql_result)) { $item_id = $row["ITEM_ID"]; $item_title=$row["ITEM_TITLE"]; $item_desc=$row["ITEM_DESC"]; $item_price=$row["ITEM_PRICE"]; echo "<TR><TD>$item_id</TD><TD>$item_title</TD><TD>$item_desc</TD><TD a$ } echo "</table>"; </SNIP> line 30 is "$item_id+$row["ITEM_ID"]; I realize it may be difficult to see the problem from the limited information above, but if someone could at least point me in the right direction. I am having trouble understanding what the error code is trying to tell me. Thanks, Scott

« previous php.general (#13702) next »