I am getting this error in my cart.php
Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in cart.php on line 74
line 74 is
$subtotal = $_SESSION['cart'][$row['id_number']]['quantity']*$row['price'];
<?php
if(isset($_POST['submit']))
{
foreach($_POST as $items => $item)
{
$items = explode("-",$items);
$items = end($items);
$items = explode("submit",$items);
$items = end($items);
if($_POST['quantity-'.$items]<=0)
{
unset($_SESSION['cart'][$items]);
}
else
{
$_SESSION['cart'][$items]['quantity']=$item;
}
}
} error_reporting(0);
?>
<h1>View Cart</h1>
<a href = "cds.php?page=products" title="go back to products page">Go Back To Products Page</a>
<?php $sql = "SELECT * FROM product WHERE id_number IN (";
foreach($_SESSION['cart'] as $id_b00073643 => $value)
{
$sql.= $id_b00073643.",";
}
$sql= substr($sql,0,-1).") ORDER BY name ASC";
$query = mysql_query($sql);
if(empty($query))
{
echo"You need to add an item first";
}
?>
<form method = "post" action = "cds.php?page=cart">
<fieldset>
<table border="1">
<tr>
<th>artist</th>
<th>name</th>
<th>price</th>
<th>genre</th>
<th>type</th>
<th></th>
</tr>
<?PHP
$sql = "SELECT * FROM product WHERE id_number IN (";
foreach($_SESSION['cart'] as $id_b00073643 => $value)
{
$sql.= $id_b00073643.",";
}
$sql= substr($sql,0,-1).") ORDER BY artist ASC";
$query = mysql_query($sql);
$cost = 0;
if(!empty($query))`
{
while($row = mysql_fetch_array($query))
{
$subtotal = $_SESSION['cart'][$row['id_number']]['quantity']*$row['price'];
$cost += subtotal;
?>
<tr>
<td><?PHP echo $row['name'];?></td>
<td><input type = "text" name = "quantity"<?PHP echo $row['id_number'];?>"size ="5" value="<?php echo $_SESSION['cart'][$row['id_number']]['quantity'];?>"/></td>
<td><?php echo"$".$row['price'];?></td>
<td><?php echo"$".$_SESSION['cart'][$row['id_number']]['quantity']*$row['price'];?></td>
</tr>
<?PHP
} }
?>
<tr>
<td> </td>
<td></td>
<td>total price</td>
<td><?PHP echo"$" . $cost; ?></td>
</tr>
</table>
<input type = "submit" name = "submit" value = "update cart"/></fieldset>
</form>
<p> to remove an item set quantity to 0</p>