i'm working on a project where i need to embed an html link in a variable
$link = "<a href=\"update.p hp?id='.$row['id'].\'">Update</a>";
and i keep getting this:
Parse error: parse error, unexpected T_ENCAPSED_AND_ WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING on line 88
--------------------------------------------------------------------------------
on the other hand i tried to test it as an echo
echo '<a href="update.ph p?id='.$row['id'].'">Update</a>'; <<<< works
any idea what is the right syntax
hope some one can help
$link = "<a href=\"update.p hp?id='.$row['id'].\'">Update</a>";
and i keep getting this:
Parse error: parse error, unexpected T_ENCAPSED_AND_ WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING on line 88
--------------------------------------------------------------------------------
on the other hand i tried to test it as an echo
echo '<a href="update.ph p?id='.$row['id'].'">Update</a>'; <<<< works
any idea what is the right syntax
hope some one can help
Comment