Jump to content

need a 2nd pair of eyes


RyanSF07

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/223104-need-a-2nd-pair-of-eyes/
Share on other sites

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

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>";
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.