Foser Posted June 22, 2007 Share Posted June 22, 2007 I have a little problem. Im trying to add a bit of html in my code but when i do I get a Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' echo "<a href="index.php">Click Here To Go To The Login Page </a>"; I think it's because I have index.php which is in blue function color in dreamweaver. I forgot the command that will block it and make it as normal to no make it think it's a php command. thanks Link to comment https://forums.phpfreaks.com/topic/56667-solved-href-html-code-in-echo-problem/ Share on other sites More sharing options...
btherl Posted June 22, 2007 Share Posted June 22, 2007 Here's two options: echo "<a href=\"index.php\">Click Here To Go To The Login Page </a>"; echo '<a href="index.php">Click Here To Go To The Login Page </a>'; Link to comment https://forums.phpfreaks.com/topic/56667-solved-href-html-code-in-echo-problem/#findComment-279924 Share on other sites More sharing options...
corillo181 Posted June 22, 2007 Share Posted June 22, 2007 echo "<a href='index.php'>Click Here To Go To The Login Page </a>"; his 2 ways simple shows that you have to enclose the tags the right way. here your code is leaving index.php exposed so it will read until "<a href=" echo "<a href="index.php">Click Here To Go To The Login Page </a>"; Link to comment https://forums.phpfreaks.com/topic/56667-solved-href-html-code-in-echo-problem/#findComment-279925 Share on other sites More sharing options...
CrazeD Posted June 22, 2007 Share Posted June 22, 2007 Pay attention to what your errors say. It tells you it's a syntax error. That means it has something to do with quotations, semi colons, commas, etc. Link to comment https://forums.phpfreaks.com/topic/56667-solved-href-html-code-in-echo-problem/#findComment-279926 Share on other sites More sharing options...
Foser Posted June 22, 2007 Author Share Posted June 22, 2007 Thanks Guys Link to comment https://forums.phpfreaks.com/topic/56667-solved-href-html-code-in-echo-problem/#findComment-279936 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.