wantabe2
asked on
PHP Code Help Neded
The code below is displayed as part of a script. I'm trying to get "To go to the main page click here" to be the bottom line but keep getting an error on this line that says "Parse error; unexpected T_STRING, expecting ',' or ';'
Can someone help me out.....I can't figure it out...I think I've looked at it too long. lol, thanks
Can someone help me out.....I can't figure it out...I think I've looked at it too long. lol, thanks
echo "<p><center><h2>My Office</h2></center></p>";
echo "<p><h3><center>Office Three</center></h3></p>";
echo "<center>An email has been sent to the person who made this assignment notifying them it is complete.";
echo "<center>To go to the main page <a href="http://mysite/flow/index.html">click here</a>.</b></i></p></center>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You had " inside your " and was missing the "; at the end of the line as well.
You have nested " in the string - just escape them with \ - or use a single apostrophe to wrap the string
Escaping
Escaping
echo "<p><center><h2>My Office</h2></center></p>";
echo "<p><h3><center>Office Three</center></h3></p>";
echo "<center>An email has been sent to the person who made this assignment notifying them it is complete.";
echo "<center>To go to the main page <a href=\"http://mysite/flow/index.html\">click here</a>.</b></i></p></center>";
Using an apostropheecho '<p><center><h2>My Office</h2></center></p>';
echo '<p><h3><center>Office Three</center></h3></p>';
echo '<center>An email has been sent to the person who made this assignment notifying them it is complete.';
echo '<center>To go to the main page <a href="http://mysite/flow/index.html">click here</a>.</b></i></p></center>';
echo "<center>To go to the main page <a href="http://mysite/flow/index.html">click here</a>.</b></i></p></cen
The double-quotes in the link should be escaped, and the line should end with "; like this:
echo "<center>To go to the main page <a href=\"http://mysite/flow/index.html\">click here</a>.</b></i></p></cen