Page 1 of 1

[SOLVED] Link syntax trouble using db variable

Posted: Wed Sep 08, 2004 3:23 pm
by cdickson
Am trying to link to a variable, and I have successfully used this code previously:

Code: Select all

echo("<a href="updateorder.php?order_no={$row['order_no']}">$row["order_no"]</a>");
This time, however, I am getting the following parsing error:
Parse error: parse error, unexpected '\"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/michigan/www/www/updatelist.php on line 125
Can anyone tell me what I've done wrong? :?:

Posted: Wed Sep 08, 2004 3:45 pm
by feyd

Code: Select all

echo("<a href="updateorder.php?order_no={$row['order_no']}">{$row["order_no"]}</a>");

Posted: Wed Sep 08, 2004 4:09 pm
by cdickson
Ah! Those pesky little brackets make a world of difference.

Thanks! :D