RyanSF07 Posted December 31, 2010 Share Posted December 31, 2010 Hi Guys, What am I missing here $lside_content2 .= "<tr><td> <a class=\"bl\" href = \"quiz_int3.php?id=$row[id]&pagenum=$pagenum\" target='_self'> $row[title]</a> ". echo ThumbsUp::item($row['id']); ."</p></td></tr>"; } I'm getting this error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING thank you for your help! Quote Link to comment https://forums.phpfreaks.com/topic/223104-need-a-2nd-pair-of-eyes/ Share on other sites More sharing options...
soltek Posted December 31, 2010 Share Posted December 31, 2010 Try to remove the ' ' here: $row['id']) Quote Link to comment https://forums.phpfreaks.com/topic/223104-need-a-2nd-pair-of-eyes/#findComment-1153446 Share on other sites More sharing options...
Pikachu2000 Posted December 31, 2010 Share Posted December 31, 2010 Associative array indices are supposed to be quoted. Don't remove the quotes. What are you trying to make that code do? Quote Link to comment https://forums.phpfreaks.com/topic/223104-need-a-2nd-pair-of-eyes/#findComment-1153447 Share on other sites More sharing options...
RyanSF07 Posted December 31, 2010 Author Share Posted December 31, 2010 while ($row = mysql_fetch_array($query_result2)) { $lside_content2 .= "<tr><td> <a class=\"bl\" href = \"quiz_int3.php?id=$row[id]&pagenum=$pagenum\" target='_self'> $row[title]</a> " . " <? echo ThumbsUp::item($row[id]); ?> "."</p></td></tr>"; } I want to call a bunch of links from the database and have this little thumbs up dealie right next to the title. I want to name the dealie with a unique item name (row id). But I'm having trouble with the concatenation. thanks Quote Link to comment https://forums.phpfreaks.com/topic/223104-need-a-2nd-pair-of-eyes/#findComment-1153448 Share on other sites More sharing options...
jcbones Posted December 31, 2010 Share Posted December 31, 2010 You are trying to put an echo in the middle of a variable. You should make the variable, then echo it. $lside_content2 .= "<tr><td> <a class=\"bl\" href = \"quiz_int3.php?id=$row[id]&pagenum=$pagenum\" target='_self'> $row[title]</a> ". ThumbsUp::item($row['id']) ."</p></td></tr>"; } Quote Link to comment https://forums.phpfreaks.com/topic/223104-need-a-2nd-pair-of-eyes/#findComment-1153449 Share on other sites More sharing options...
RyanSF07 Posted December 31, 2010 Author Share Posted December 31, 2010 Thank you very much for your help! Quote Link to comment https://forums.phpfreaks.com/topic/223104-need-a-2nd-pair-of-eyes/#findComment-1153450 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.