mmerril1 Posted January 5, 2009 Share Posted January 5, 2009 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. Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted January 5, 2009 Share Posted January 5, 2009 Err, no. Typo: } esle { Should be: } else { Incidentally, what editor are you using to write your code? Anything with syntax highlighting would have made that easier to spot. Quote Link to comment 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.