Jump to content

Echo hyperlink variable


Colette

Recommended Posts

Need to use a variable as the hyperlink destination. I'm getting an error:

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in (refers to the second line of code here.)

 

echo 'Message: ' . nl2br(htmlentities($row['message'])) . '<br />';	
   
echo '<a href=\"$row['http']\">'$row['http']'</a>';

 

I can't seem to find the error. Tried all kind of variations.

Link to comment
https://forums.phpfreaks.com/topic/205055-echo-hyperlink-variable/
Share on other sites

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.