Posted by Sanders Kaufman on 11/14/07 15:41
"Lloyd Harold" <lloyd@harold.invalid> wrote in message
news:1i7knn8.xncn8ogzxqv9N%lloyd@harold.invalid...
> I've tried the code and am seeing this error:
>
> expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in
>
> "<p><a href='/details.php?id=$data['id']'>$data['name']</a></p>\n";
You gotta enclose complex variables like "$data['id']" in curly-brackets
when you use them inside a string like that.
Thus, it should be:
"<p><a href='/details.php?id={$data['id']}'>{$data['name']}</a></p>\n";
Navigation:
[Reply to this message]
|