Jump to content

heredoc string problems


mmerril1

Recommended Posts

Hey everyone

I am new here and new to php

I am having trouble with heredoc strings

I think it is because of the special characters I'm using.

 

Anyways this is what it looks like

 

Parse error: syntax error, unexpected T_SL on line 48

code starts on line 46

 

	if ($_POST[web] != ""){
$title = <<<TEST 
<a class="active" href="http://$_POST[web]" target="_blank">$_POST[bname]</a><br>
TEST;
} esle { 
$title = <<<TEST 
<font class="nosite">$_POST[bname]</font><br>
TEST;
}

 

So am I even allowed to put the html stuff in there ?

Is that wats messing it up?

 

Thank you for the help.

Link to comment
https://forums.phpfreaks.com/topic/139541-heredoc-string-problems/
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.