problem with concanation

Hi Everybody,

I am working on php/myql shopping cart tutorial, but i do have an issue with concanation into my script, could somebody take a look and help, the error i hav is this one:

Parse error: syntax error, unexpected ‘"’, expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING)

I have tried to escaped the string, but got the same issue. here is the full code:
[php]

<?php require('includes/config.php'); require('includes/function.php'); $validid = pf_validate_number($_GET['id'],"redirect",$config_basedir); require('includes/header.php'); $prodcatsql = 'SELECT * FROM products WHERE cat_id = :id'; $stmt = $pdo->prepare($prodcatsql); $stmt = bindValue(':id', $_GET['id']); $stmt->execute(); $numrows = $stmt->rowCount(); if ($numrows==0) { echo "

No products

"; echo "There are no products in this category"; } else { foreach ($stmt as $row) { echo""; if (empty($row['image'])) { echo""; } else { echo ""; } echo ""; echo ""; }//end of foreach loop echo " tbody>
.$row[ "; echo "

" . $row['name'] . "

"; echo "" . $row['description']; echo "OUR PRICE: £". sprintf('%.2f', $row['price']) . ""; echo "[buy]"; echo "
" }// end of main else conditon require('includes/footer.php'); ?>

[/php]
Regards

Please remember to use the php tags. They help us help you.

Look at the syntax highlighting on lines 50 and 59. I believe I pointed this out already as well.

" is not php.

Sponsor our Newsletter | Privacy Policy | Terms of Service